Revoke both refresh token and access token

This commit is contained in:
Alex Bilbie 2016-01-14 23:47:19 +00:00
parent 0b061e3086
commit b57b497cb7

View File

@ -165,8 +165,9 @@ class RefreshTokenGrant extends AbstractGrant
$accessToken->addScope($scope); $accessToken->addScope($scope);
} }
// Expire the old token and save the new one // Expire the old tokens and save the new one
$this->accessTokenRepository->revokeAccessToken($oldRefreshToken->getClaim('accessToken')); $this->accessTokenRepository->revokeAccessToken($oldRefreshTokenData['access_token_id']);
$this->refreshTokenRepository->revokeRefreshToken($oldRefreshTokenData['refresh_token_id']);
// Generate a new refresh token // Generate a new refresh token
$refreshToken = new RefreshTokenEntity(); $refreshToken = new RefreshTokenEntity();