سؤال

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

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top