From 87fbcb19afc1eb8a4b1b485a2e2e118202065001 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Wed, 7 May 2014 17:09:45 +0100 Subject: [PATCH] Use the correct variable --- src/Grant/RefreshTokenGrant.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Grant/RefreshTokenGrant.php b/src/Grant/RefreshTokenGrant.php index c84503c0..01f5e695 100644 --- a/src/Grant/RefreshTokenGrant.php +++ b/src/Grant/RefreshTokenGrant.php @@ -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(); }