mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Fix #231
This commit is contained in:
@@ -99,10 +99,17 @@ class ResourceServer extends AbstractServer
|
||||
// Set the access token
|
||||
$this->accessToken = $this->getAccessTokenStorage()->get($accessTokenString);
|
||||
|
||||
// Ensure the access token exists
|
||||
if (!$this->accessToken instanceof AccessTokenEntity) {
|
||||
throw new Exception\AccessDeniedException;
|
||||
}
|
||||
|
||||
// Check the access token hasn't expired
|
||||
// Ensure the auth code hasn't expired
|
||||
if ($this->accessToken->isExpired() === true) {
|
||||
throw new Exception\AccessDeniedException;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user