From 7242a8db31cbc3e4a6a4724a47308f7c67b93e02 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 17 Jan 2016 12:58:00 +0000 Subject: [PATCH] Added access denied exception --- src/Exception/OAuthServerException.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Exception/OAuthServerException.php b/src/Exception/OAuthServerException.php index f5630c63..701f1335 100644 --- a/src/Exception/OAuthServerException.php +++ b/src/Exception/OAuthServerException.php @@ -191,6 +191,18 @@ class OAuthServerException extends \Exception return new static('The refresh token is invalid.', 'invalid_request', 400, $hint); } + /** + * Access denied + * + * @param null|string $hint + * + * @return static + */ + public static function accessDenied($hint = null) + { + return new static('The resource owner or authorization server denied the request.', 401, $hint); + } + /** * @return string */