2016-08-04 03:37:21 +05:30
|
|
|
<?php
|
|
|
|
namespace api\components\ApiUser;
|
|
|
|
|
|
|
|
use yii\web\User as YiiUserComponent;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @property Identity|null $identity
|
|
|
|
*
|
2016-12-18 04:50:53 +05:30
|
|
|
* @method Identity|null getIdentity($autoRenew = true)
|
|
|
|
* @method Identity|null loginByAccessToken($token, $type = null)
|
2016-08-04 03:37:21 +05:30
|
|
|
*/
|
|
|
|
class Component extends YiiUserComponent {
|
|
|
|
|
2016-08-06 19:06:24 +05:30
|
|
|
public $identityClass = Identity::class;
|
2016-08-04 03:37:21 +05:30
|
|
|
|
|
|
|
public $enableSession = false;
|
|
|
|
|
|
|
|
public $loginUrl = null;
|
|
|
|
|
2016-08-06 19:06:24 +05:30
|
|
|
public function getAccessChecker() {
|
|
|
|
return new AuthChecker();
|
|
|
|
}
|
|
|
|
|
2016-08-04 03:37:21 +05:30
|
|
|
}
|