oauthlib.oauth2.rfc6749.errors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Error used both by OAuth 2 clients and provicers to represent the spec
+Error used both by OAuth 2 clients and providers to represent the spec
defined error responses for all four core grant types.
"""
from __future__ import unicode_literals
pass
-class InvalidRedirectURIError(FatalClientError):
- error = 'invalid_redirect_uri'
+class InvalidRequestFatalError(FatalClientError):
+ """For fatal errors, the request is missing a required parameter, includes
+ an invalid parameter value, includes a parameter more than once, or is
+ otherwise malformed.
+ """
+ error = 'invalid_request'
+
+class InvalidRedirectURIError(InvalidRequestFatalError):
+ description = 'Invalid redirect URI.'
-class MissingRedirectURIError(FatalClientError):
- error = 'missing_redirect_uri'
+class MissingRedirectURIError(InvalidRequestFatalError):
+ description = 'Missing redirect URI.'
-class MismatchingRedirectURIError(FatalClientError):
- error = 'mismatching_redirect_uri'
+class MismatchingRedirectURIError(InvalidRequestFatalError):
+ description = 'Mismatching redirect URI.'
-class MissingClientIdError(FatalClientError):
- error = 'invalid_client_id'
+class InvalidClientIdError(InvalidRequestFatalError):
+ description = 'Invalid client_id parameter value.'
-class InvalidClientIdError(FatalClientError):
- error = 'invalid_client_id'
+
+class MissingClientIdError(InvalidRequestFatalError):
+ description = 'Missing client_id parameter.'
class InvalidRequestError(OAuth2Error):
error = 'invalid_request'
+class MissingResponseTypeError(InvalidRequestError):
+ description = 'Missing response_type parameter.'
+
+
class AccessDeniedError(OAuth2Error):
"""The resource owner or authorization server denied the request."""