Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the AuthorizationCode #105

Open
MingyueMa opened this issue Sep 7, 2016 · 2 comments
Open

How to use the AuthorizationCode #105

MingyueMa opened this issue Sep 7, 2016 · 2 comments

Comments

@MingyueMa
Copy link

Hi
When someone use the third party login to my system without password,like Authorization code , how should I create access_token ? In the configuration file , I did like this
'modules' => [ 'oauth2' => [ 'class' => 'filsh\yii2\oauth2server\Module', 'tokenParamName' => 'accessToken', 'tokenAccessLifetime' => 3600 * 24 * 7, 'refreshTokenLifetime' => 3600 * 24 * 30, 'storageMap' => [ 'user_credentials' => 'common\models\WtkUser', ], 'grantTypes' => [ 'authorization_code' => [ 'class' => 'OAuth2\GrantType\AuthorizationCode' ], 'refresh_token' => [ 'class' => 'OAuth2\GrantType\RefreshToken', 'always_issue_new_refresh_token' => true ] ] ], ],
the model 'WtkUser' was defined in 'common\models\WtkUser.php' , this class implements \OAuth2\Storage\AuthorizationCodeInterface , there are three function should be implemented , but I don't know how to do it ? Anyone can help me?
Thanks again!

@zw1371
Copy link

zw1371 commented Sep 7, 2016

oh,i havent user the AuthorizationCode, i cannt understand what you wrote

@zw1371
Copy link

zw1371 commented Sep 7, 2016

真的不是很懂哦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants