Skip to content
This repository was archived by the owner on Jun 12, 2021. It is now read-only.

Commit 75d1806

Browse files
committed
logging
1 parent 367aae1 commit 75d1806

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/oidcendpoint/common/authorization.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ def verify_uri(endpoint_context, request, uri_type, client_id=None):
6969
if not _cid:
7070
logger.error("No client id found")
7171
raise UnknownClient("No client_id provided")
72+
else:
73+
logger.debug('Client ID: {}'.format(_cid))
7274

7375
_redirect_uri = unquote(request[uri_type])
7476

@@ -84,6 +86,9 @@ def verify_uri(endpoint_context, request, uri_type, client_id=None):
8486
# Get the clients registered redirect uris
8587
redirect_uris = endpoint_context.cdb.get(_cid, {}).get("{}s".format(uri_type))
8688
if not redirect_uris:
89+
if _cid not in endpoint_context.cdb:
90+
logger.debug("CIDs: {}".format(list(endpoint_context.cdb.keys())))
91+
raise ValueError("No such client")
8792
raise ValueError("No registered {}".format(uri_type))
8893
else:
8994
for regbase, rquery in redirect_uris:

0 commit comments

Comments
 (0)