Removed dead code

This commit is contained in:
Alex Bilbie 2014-11-07 01:36:12 +00:00
parent 1c2ec943e9
commit e37289231d
2 changed files with 4 additions and 4 deletions

View File

@ -137,21 +137,21 @@ class RefreshTokenGrant extends AbstractGrant
// Expire the old token and save the new one // Expire the old token and save the new one
$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->getTokenType()->setSession($session); $this->server->getTokenType()->setSession($session);
$this->server->getTokenType()->setParam('access_token', $newAccessToken->getId()); $this->server->getTokenType()->setParam('access_token', $newAccessToken->getId());
$this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL()); $this->server->getTokenType()->setParam('expires_in', $this->getAccessTokenTTL());
// Expire the old refresh token // Expire the old refresh token
$oldRefreshToken->expire($this->server->getStorage('refresh_token')); $oldRefreshToken->expire();
// Generate a new refresh token // Generate a new refresh token
$newRefreshToken = new RefreshTokenEntity($this->server); $newRefreshToken = new RefreshTokenEntity($this->server);
$newRefreshToken->setId(SecureKey::generate()); $newRefreshToken->setId(SecureKey::generate());
$newRefreshToken->setExpireTime($this->getRefreshTokenTTL() + time()); $newRefreshToken->setExpireTime($this->getRefreshTokenTTL() + time());
$newRefreshToken->setAccessToken($newAccessToken); $newRefreshToken->setAccessToken($newAccessToken);
$newRefreshToken->save($this->server->getStorage('refresh_token')); $newRefreshToken->save();
$this->server->getTokenType()->setParam('refresh_token', $newRefreshToken->getId()); $this->server->getTokenType()->setParam('refresh_token', $newRefreshToken->getId());

View File

@ -182,7 +182,7 @@ class ResourceServer extends AbstractServer
{ {
$accessTokenString = ($accessToken !== null) $accessTokenString = ($accessToken !== null)
? $accessToken ? $accessToken
: $this->determineAccessToken($headersOnly, $accessToken); : $this->determineAccessToken($headersOnly);
// Set the access token // Set the access token
$this->accessToken = $this->storages['access_token']->get($accessTokenString); $this->accessToken = $this->storages['access_token']->get($accessTokenString);