Skip to content

Commit 82544c2

Browse files
authored
Merge pull request oauthlib#716 from braedon/improve-validator-skeleton
2 parents 90d6398 + e2f8911 commit 82544c2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

examples/skeleton_oauth2_web_application_server.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,18 @@ def save_authorization_code(self, client_id, code, request, *args, **kwargs):
5454

5555
# Token request
5656

57+
def client_authentication_required(self, request, *args, **kwargs):
58+
# Check if the client provided authentication information that needs to
59+
# be validated, e.g. HTTP Basic auth
60+
pass
61+
5762
def authenticate_client(self, request, *args, **kwargs):
5863
# Whichever authentication method suits you, HTTP Basic might work
5964
pass
6065

6166
def authenticate_client_id(self, client_id, request, *args, **kwargs):
62-
# Don't allow public (non-authenticated) clients
63-
return False
67+
# The client_id must match an existing public (non-confidential) client
68+
pass
6469

6570
def validate_code(self, client_id, code, client, request, *args, **kwargs):
6671
# Validate the code belongs to the client. Add associated scopes

0 commit comments

Comments
 (0)