Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/pyop/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def to_error_url(self):
return None


class UnknownClientId(InvalidAuthenticationRequest):
def to_error_url(self):
return None


class InvalidRedirectURI(InvalidAuthenticationRequest):
def to_error_url(self):
return None
Expand Down
3 changes: 2 additions & 1 deletion src/pyop/request_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from .exceptions import InvalidClientRegistrationRequest
from .exceptions import InvalidAuthenticationRequest
from .exceptions import UnknownClientId
from .exceptions import InvalidRedirectURI
from .util import is_allowed_response_type, find_common_values

Expand Down Expand Up @@ -32,7 +33,7 @@ def client_id_is_known(provider, authentication_request):
"""
if authentication_request['client_id'] not in provider.clients:
logger.error('Unknown client_id \'{}\''.format(authentication_request['client_id']))
raise InvalidAuthenticationRequest('Unknown client_id',
raise UnknownClientId('Unknown client_id',
authentication_request,
oauth_error='unauthorized_client')

Expand Down