Проверка oAuth авторизации организована через oauth компонент и больше не завязана на реализации внутри моделей приложения

This commit is contained in:
ErickSkrauch
2016-11-30 12:19:10 +03:00
parent 422d5c4fd4
commit 23d079346b
4 changed files with 27 additions and 28 deletions

View File

@@ -3,21 +3,21 @@ namespace common\models;
use common\components\Redis\Set;
use Yii;
use yii\base\ErrorException;
use yii\db\ActiveRecord;
/**
* Поля:
* @property integer $id
* @property string $owner_type
* @property string $owner_id
* @property string $client_id
* @property string $client_redirect_uri
* @property integer $id
* @property string $owner_type
* @property string $owner_id
* @property string $client_id
* @property string $client_redirect_uri
*
* Отношения
* @property OauthAccessToken[] $accessTokens
* @property OauthClient $client
* @property Account $account
* @property Set $scopes
* @property OauthClient $client
* @property Account $account
* @property Set $scopes
*/
class OauthSession extends ActiveRecord {
@@ -26,7 +26,7 @@ class OauthSession extends ActiveRecord {
}
public function getAccessTokens() {
return $this->hasMany(OauthAccessToken::class, ['session_id' => 'id']);
throw new ErrorException('This method is possible, but not implemented');
}
public function getClient() {