mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 17:56:14 +05:30
Use the correct variable
This commit is contained in:
parent
6300cd5d72
commit
87fbcb19af
@ -131,8 +131,8 @@ class RefreshTokenGrant extends AbstractGrant
|
||||
$oldAccessToken->expire($this->server->getStorage('access_token'));
|
||||
$newAccessToken->save($this->server->getStorage('access_token'));
|
||||
|
||||
$this->server->getTokenType()->set('access_token', $accessToken->getToken());
|
||||
$this->server->getTokenType()->set('expires', $accessToken->getExpireTime());
|
||||
$this->server->getTokenType()->set('access_token', $newAccessToken->getToken());
|
||||
$this->server->getTokenType()->set('expires', $newAccessToken->getExpireTime());
|
||||
$this->server->getTokenType()->set('expires_in', $this->server->getAccessTokenTTL());
|
||||
|
||||
// Expire the old refresh token
|
||||
@ -145,7 +145,7 @@ class RefreshTokenGrant extends AbstractGrant
|
||||
$newRefreshToken->setAccessToken($newAccessToken);
|
||||
$newRefreshToken->save($this->server->getStorage('refresh_token'));
|
||||
|
||||
$this->server->getTokenType()->set('refresh_token', $refreshToken->getToken());
|
||||
$this->server->getTokenType()->set('refresh_token', $newRefreshToken->getToken());
|
||||
|
||||
return $this->server->getTokenType()->generateResponse();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user