dev-master
9999999-devYii2 OAuth Client For wangrunxin.com.
MIT
The Requires
by WANG Runxin
Wallogit.com
2017 © Pedro Peláez
Yii2 OAuth Client For wangrunxin.com.
A wrapper for implementing an OAuth2 Server(https://www.wangrunxin.com), (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist wangrunxinyes/yii2-wrx-oauth2-client "*"
or add, (*4)
"wangrunxinyes/yii2-wrx-oauth2-client": "*"
to the require section of your composer.json., (*5)
To use this extension, simply add the following code in your application configuration as a new module:, (*6)
'modules'=>[
//other modules .....
'wrx' => [
'class' => 'wangrunxinyes\OAuth\Module',
'controllerMap' => [
//Overwrite OauthController and handle AuthSccuess for your own project;
//Your OauthController should extend wangrunxinyes\OAuth\controllers\OauthController.
'oauth' => 'Your own OauthController className',
],
'mixKey' => 'Your random code',
],
],
'components' => [
//other components .....
'authClientCollection' => [
'class' => yii\authclient\Collection::class,
'clients' => [
'wrxauth' => [
'class' => wangrunxinyes\OAuth\models\Client::class,
'clientId' => 'Your client_id',
'clientSecret' => 'Your client_secret',
'scope' => '',
],
],
],
],
],
The next step your shold run migration, (*7)
yii migrate --migrationPath=@vendor/wangrunxinyes/yii2-wrx-oauth2-client/migrations
For more, see https://www.wangrunxin.com/oauth.js, (*8)
Yii2 OAuth Client For wangrunxin.com.
MIT