Skip to content

Commit

Permalink
Merge pull request #462 from skion/oidc-errors
Browse files Browse the repository at this point in the history
Add remaining OIDC errors
  • Loading branch information
thedrow committed Mar 31, 2017
2 parents cd19a1a + 9e4ac2c commit 0573457
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion oauthlib/oauth2/rfc6749/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class LoginRequired(OpenIDClientError):
status_code = 401


class AccountSelectionRequried(OpenIDClientError):
class AccountSelectionRequired(OpenIDClientError):
"""The End-User is REQUIRED to select a session at the Authorization Server.
The End-User MAY be authenticated at the Authorization Server with
Expand All @@ -312,6 +312,48 @@ class ConsentRequired(OpenIDClientError):
status_code = 401


class InvalidRequestURI(OpenIDClientError):
"""
The request_uri in the Authorization Request returns an error or
contains invalid data.
"""
error = 'invalid_request_uri'
description = 'The request_uri in the Authorization Request returns an ' \
'error or contains invalid data.'


class InvalidRequestObject(OpenIDClientError):
"""
The request parameter contains an invalid Request Object.
"""
error = 'invalid_request_object'
description = 'The request parameter contains an invalid Request Object.'


class RequestNotSupported(OpenIDClientError):
"""
The OP does not support use of the request parameter.
"""
error = 'request_not_supported'
description = 'The request parameter is not supported.'


class RequestURINotSupported(OpenIDClientError):
"""
The OP does not support use of the request_uri parameter.
"""
error = 'request_uri_not_supported'
description = 'The request_uri parameter is not supported.'


class RegistrationNotSupported(OpenIDClientError):
"""
The OP does not support use of the registration parameter.
"""
error = 'registration_not_supported'
description = 'The registration parameter is not supported.'


def raise_from_error(error, params=None):
import inspect
import sys
Expand Down

0 comments on commit 0573457

Please sign in to comment.