문제

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