Question

I am following this guide (http://www.lornajane.net/posts/2013/oauth-middleware-for-slim) to setup oAuth2 with php SLIM.

I dont't understand this part:

$auth = new \Service\Mysql\AuthService($this->mysql, $this->config);
            $validated_user_id = $auth->verifyOAuth($authHeader);
            $this->app->user_id = $validated_user_id;

Where can I take the class \Service\Mysql\AuthService and what is the variable config ? Otherwise is there another guide with more details also without direct SLIM implementation ?

Thanks

Was it helpful?

Solution

That's the service class that will actually do the loading and storing of user details. Then you should put your own class.

This could be useful: https://github.com/alexbilbie/oauth2-example-resource-server

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top