This commit is contained in:
Alex Bilbie
2014-11-08 16:44:39 +00:00
parent 856051bfb3
commit b9debaab26
7 changed files with 80 additions and 5 deletions

View File

@@ -209,6 +209,11 @@ class AuthCodeGrant extends AbstractGrant
throw new Exception\InvalidRequestException('code');
}
// Ensure the auth code hasn't expired
if ($code->isExpired() === true) {
throw new Exception\InvalidRequestException('code');
}
// Check redirect URI presented matches redirect URI originally used in authorize request
if ($code->getRedirectUri() !== $redirectUri) {
throw new Exception\InvalidRequestException('redirect_uri');