Use the correct variable

This commit is contained in:
Alex Bilbie 2014-05-07 17:09:45 +01:00
parent 6300cd5d72
commit 87fbcb19af

View File

@ -131,8 +131,8 @@ class RefreshTokenGrant extends AbstractGrant
$oldAccessToken->expire($this->server->getStorage('access_token')); $oldAccessToken->expire($this->server->getStorage('access_token'));
$newAccessToken->save($this->server->getStorage('access_token')); $newAccessToken->save($this->server->getStorage('access_token'));
$this->server->getTokenType()->set('access_token', $accessToken->getToken()); $this->server->getTokenType()->set('access_token', $newAccessToken->getToken());
$this->server->getTokenType()->set('expires', $accessToken->getExpireTime()); $this->server->getTokenType()->set('expires', $newAccessToken->getExpireTime());
$this->server->getTokenType()->set('expires_in', $this->server->getAccessTokenTTL()); $this->server->getTokenType()->set('expires_in', $this->server->getAccessTokenTTL());
// Expire the old refresh token // Expire the old refresh token
@ -145,7 +145,7 @@ class RefreshTokenGrant extends AbstractGrant
$newRefreshToken->setAccessToken($newAccessToken); $newRefreshToken->setAccessToken($newAccessToken);
$newRefreshToken->save($this->server->getStorage('refresh_token')); $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(); return $this->server->getTokenType()->generateResponse();
} }