Exemplo n.º 1
0
 public function getResponseData()
 {
     $acessToken = AccessToken::createAccessToken(['client_id' => $this->client_id, 'user_id' => \Yii::$app->user->id, 'expires' => $this->accessTokenLifetime + time(), 'scope' => $this->scope]);
     $refreshToken = RefreshToken::createRefreshToken(['client_id' => $this->client_id, 'user_id' => \Yii::$app->user->id, 'expires' => $this->refreshTokenLifetime + time(), 'scope' => $this->scope]);
     return ['access_token' => $acessToken->access_token, 'expires_in' => $this->accessTokenLifetime, 'token_type' => $this->tokenType, 'scope' => $this->scope, 'refresh_token' => $refreshToken->refresh_token];
 }