summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Huot <JonathanHuot@users.noreply.github.com>2019-08-30 12:54:41 +0200
committerGitHub <noreply@github.com>2019-08-30 12:54:41 +0200
commit2063ac37d63502f4db7ade95078cac6c28787215 (patch)
treeeb4841bca518728e5fcd6d3a5476db8ba578046c
parentca57b0bcae835493d9db8f9bf1f1228b71b8e3f8 (diff)
parent27151752e0ba82bb07042b4a9bd5cd2b4482c126 (diff)
downloadoauthlib-2063ac37d63502f4db7ade95078cac6c28787215.tar.gz
Extended the requirements of the authenticate_client method docu… (#694)
Extended the requirements of the authenticate_client method documentation
-rw-r--r--oauthlib/oauth2/rfc6749/request_validator.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/oauthlib/oauth2/rfc6749/request_validator.py b/oauthlib/oauth2/rfc6749/request_validator.py
index 78d025b..81d9060 100644
--- a/oauthlib/oauth2/rfc6749/request_validator.py
+++ b/oauthlib/oauth2/rfc6749/request_validator.py
@@ -49,6 +49,17 @@ class RequestValidator:
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