From 8a26eaa8947cb0e3e5b2dadc38fb157b097d5a42 Mon Sep 17 00:00:00 2001 From: Zsolt Balint Date: Fri, 9 Aug 2019 16:52:58 +0300 Subject: Extended the requirements of the authenticate_client method documentation. --- oauthlib/oauth2/rfc6749/request_validator.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/oauthlib/oauth2/rfc6749/request_validator.py b/oauthlib/oauth2/rfc6749/request_validator.py index 86509b6..fba02cd 100644 --- a/oauthlib/oauth2/rfc6749/request_validator.py +++ b/oauthlib/oauth2/rfc6749/request_validator.py @@ -51,6 +51,17 @@ class RequestValidator(object): Headers may be accesses through request.headers and parameters found in both body and query can be obtained by direct attribute access, i.e. request.client_id for client_id in the URL query. + + The authentication process is required to contain the identification of + the client (i.e. search the database based on the client_id). In case the + client doesn't exist based on the received client_id, this method has to + return False and the HTTP response created by the library will contain + 'invalid_client' message. + + After the client identification succeeds, this method needs to set the + client on the request, i.e. request.client = client. A client object's + class must contain the 'client_id' attribute and the 'client_id' must have + a value. :param request: OAuthlib request. :type request: oauthlib.common.Request -- cgit v1.2.1