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