diff options
author | Jonathan Huot <JonathanHuot@users.noreply.github.com> | 2019-08-30 12:54:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-30 12:54:41 +0200 |
commit | 2063ac37d63502f4db7ade95078cac6c28787215 (patch) | |
tree | eb4841bca518728e5fcd6d3a5476db8ba578046c | |
parent | ca57b0bcae835493d9db8f9bf1f1228b71b8e3f8 (diff) | |
parent | 27151752e0ba82bb07042b4a9bd5cd2b4482c126 (diff) | |
download | oauthlib-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.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 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 |