diff options
author | Zsolt Balint <zsolt.balint@cognitivecreators.com> | 2019-08-09 16:52:58 +0300 |
---|---|---|
committer | Zsolt Balint <zsolt.balint@cognitivecreators.com> | 2019-08-10 14:40:09 +0300 |
commit | 8a26eaa8947cb0e3e5b2dadc38fb157b097d5a42 (patch) | |
tree | 3a26bc51ab6b492fd681f8d3fec16579195fa259 | |
parent | 31486aa503e19ae26ba4c15f2809ddf6c5c1b248 (diff) | |
download | oauthlib-8a26eaa8947cb0e3e5b2dadc38fb157b097d5a42.tar.gz |
Extended the requirements of the authenticate_client method documentation.
-rw-r--r-- | oauthlib/oauth2/rfc6749/request_validator.py | 11 |
1 files changed, 11 insertions, 0 deletions
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 |