Implemented RFC7636. Fixes #574

This commit is contained in:
Alex Bilbie
2016-05-06 15:23:16 +01:00
parent 4a4f4fe2d7
commit 8e8aed1a50
4 changed files with 611 additions and 8 deletions

View File

@@ -172,6 +172,26 @@ class OAuthServerException extends \Exception
);
}
/**
* Invalid grant.
*
* @param string $hint
*
* @return static
*/
public static function invalidGrant($hint = '')
{
return new static(
'The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token '
. 'is invalid, expired, revoked, does not match the redirection URI used in the authorization request, '
. 'or was issued to another client.',
10,
'invalid_grant',
400,
$hint
);
}
/**
* @return string
*/