From e37289231d2ea00c52e30b278e3f61d17e898be2 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Fri, 7 Nov 2014 01:36:12 +0000 Subject: [PATCH] Removed dead code --- src/Grant/RefreshTokenGrant.php | 6 +++--- src/ResourceServer.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Grant/RefreshTokenGrant.php b/src/Grant/RefreshTokenGrant.php index 5ac9bf8e..793174f2 100644 --- a/src/Grant/RefreshTokenGrant.php +++ b/src/Grant/RefreshTokenGrant.php @@ -137,21 +137,21 @@ class RefreshTokenGrant extends AbstractGrant // Expire the old token and save the new one $oldAccessToken->expire($this->server->getStorage('access_token')); - $newAccessToken->save($this->server->getStorage('access_token')); + $newAccessToken->save(); $this->server->getTokenType()->setSession($session); $this->server->getTokenType()->setParam('access_token', $newAccessToken->getId()); $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL()); // Expire the old refresh token - $oldRefreshToken->expire($this->server->getStorage('refresh_token')); + $oldRefreshToken->expire(); // Generate a new refresh token $newRefreshToken = new RefreshTokenEntity($this->server); $newRefreshToken->setId(SecureKey::generate()); $newRefreshToken->setExpireTime($this->getRefreshTokenTTL() + time()); $newRefreshToken->setAccessToken($newAccessToken); - $newRefreshToken->save($this->server->getStorage('refresh_token')); + $newRefreshToken->save(); $this->server->getTokenType()->setParam('refresh_token', $newRefreshToken->getId()); diff --git a/src/ResourceServer.php b/src/ResourceServer.php index a169401d..ff5e5c02 100644 --- a/src/ResourceServer.php +++ b/src/ResourceServer.php @@ -182,7 +182,7 @@ class ResourceServer extends AbstractServer { $accessTokenString = ($accessToken !== null) ? $accessToken - : $this->determineAccessToken($headersOnly, $accessToken); + : $this->determineAccessToken($headersOnly); // Set the access token $this->accessToken = $this->storages['access_token']->get($accessTokenString);