Skip to content

Commit 4f63b1e

Browse files
committed
Add some logging on authentication
1 parent 6e1fe33 commit 4f63b1e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

oauth2_provider/oauth2_validators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import unicode_literals
2+
13
import base64
24
import logging
35
from datetime import timedelta
@@ -93,9 +95,11 @@ def authenticate_client_id(self, client_id, request, *args, **kwargs):
9395

9496
try:
9597
request.client = Application.objects.get(client_id=client_id)
98+
log.debug("Application %s has type %s" % (client_id, request.client.client_type))
9699
return request.client.client_type != Application.CLIENT_CONFIDENTIAL
97100

98101
except Application.DoesNotExist:
102+
log.debug("Application %s do not exists" % client_id)
99103
return False
100104

101105
def confirm_redirect_uri(self, client_id, code, redirect_uri, client, *args, **kwargs):

0 commit comments

Comments
 (0)