mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Remove refresh_token from OAuth2 result. Return the same access_token as a refresh_token in case when it's requested. Make access_tokens to live forever.
This commit is contained in:
@@ -26,7 +26,6 @@ use yii\db\ActiveRecord;
|
||||
* Behaviors:
|
||||
* @property Account|null $account
|
||||
* @property OauthSession[] $sessions
|
||||
* @property-read OauthRefreshToken[] $refreshTokens
|
||||
*/
|
||||
class OauthClient extends ActiveRecord {
|
||||
|
||||
@@ -58,10 +57,6 @@ class OauthClient extends ActiveRecord {
|
||||
return $this->hasMany(OauthSession::class, ['client_id' => 'id']);
|
||||
}
|
||||
|
||||
public function getRefreshTokens(): ActiveQuery {
|
||||
return $this->hasMany(OauthRefreshToken::class, ['client_id' => 'id']);
|
||||
}
|
||||
|
||||
public static function find(): OauthClientQuery {
|
||||
return Yii::createObject(OauthClientQuery::class, [static::class]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user