mirror of
https://github.com/elyby/oauth2-server.git
synced 2026-11-30 03:03:18 +05:30
Fix #231
This commit is contained in:
1 parent
856051bfb3
commit
b9debaab26
7 files changed
+80
-5
No files matched your search
@@ -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