Updated with new entity names

This commit is contained in:
Alex Bilbie
2014-05-02 17:21:53 +01:00
parent 8fbbc7bd07
commit 97fd115530
18 changed files with 244 additions and 218 deletions

View File

@@ -24,7 +24,7 @@ class RefreshTokenEntity extends AbstractTokenEntity
{
/**
* Access token associated to refresh token
* @var \League\OAuth2\Server\Entity\AccessToken
* @var \League\OAuth2\Server\Entity\AccessTokenEntity
*/
protected $accessToken;
@@ -61,11 +61,6 @@ class RefreshTokenEntity extends AbstractTokenEntity
$this->getExpireTime(),
$this->getAccessToken()->getToken()
);
// Associate the scope with the token
foreach ($this->getScopes() as $scope) {
$this->server->getStorage('refresh_token')->associateScope($this->getToken(), $scope->getId());
}
}
/**
@@ -73,6 +68,6 @@ class RefreshTokenEntity extends AbstractTokenEntity
*/
public function expire()
{
$this->server->getStorage('refresh_token')->delete($this->getToken());
$this->server->getStorage('refresh_token')->delete($this);
}
}