diff options
author | Braedon Vickers <braedon.vickers@gmail.com> | 2020-02-28 13:57:05 +0800 |
---|---|---|
committer | Braedon Vickers <braedon.vickers@gmail.com> | 2020-02-28 13:57:05 +0800 |
commit | a6001006dd19d6dfc7d68e6572b53fc271aae072 (patch) | |
tree | fc9e49b4f2fef8113d870e9337458ec56a6ee270 /oauthlib/openid/connect/core/grant_types/dispatchers.py | |
parent | 89cf685d0299744fe3be6d7c0fa8429b945a4d67 (diff) | |
parent | b71636e85f845b79b5a56de6480fcba9d1415720 (diff) | |
download | oauthlib-a6001006dd19d6dfc7d68e6572b53fc271aae072.tar.gz |
Merge remote-tracking branch 'upstream/master' into improve-validator-skeleton
Diffstat (limited to 'oauthlib/openid/connect/core/grant_types/dispatchers.py')
-rw-r--r-- | oauthlib/openid/connect/core/grant_types/dispatchers.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/oauthlib/openid/connect/core/grant_types/dispatchers.py b/oauthlib/openid/connect/core/grant_types/dispatchers.py index 4d880b7..6dcc0cb 100644 --- a/oauthlib/openid/connect/core/grant_types/dispatchers.py +++ b/oauthlib/openid/connect/core/grant_types/dispatchers.py @@ -9,8 +9,10 @@ class Dispatcher: class AuthorizationCodeGrantDispatcher(Dispatcher): """ - This is an adapter class that will route simple Authorization Code requests, those that have response_type=code and a scope - including 'openid' to either the default_grant or the oidc_grant based on the scopes requested. + This is an adapter class that will route simple Authorization Code + requests, those that have `response_type=code` and a scope including + `openid` to either the `default_grant` or the `oidc_grant` based on + the scopes requested. """ def __init__(self, default_grant=None, oidc_grant=None): self.default_grant = default_grant @@ -26,16 +28,20 @@ class AuthorizationCodeGrantDispatcher(Dispatcher): return handler def create_authorization_response(self, request, token_handler): + """Read scope and route to the designated handler.""" return self._handler_for_request(request).create_authorization_response(request, token_handler) def validate_authorization_request(self, request): + """Read scope and route to the designated handler.""" return self._handler_for_request(request).validate_authorization_request(request) class ImplicitTokenGrantDispatcher(Dispatcher): """ - This is an adapter class that will route simple Authorization Code requests, those that have response_type=code and a scope - including 'openid' to either the default_grant or the oidc_grant based on the scopes requested. + This is an adapter class that will route simple Authorization + requests, those that have `id_token` in `response_type` and a scope + including `openid` to either the `default_grant` or the `oidc_grant` + based on the scopes requested. """ def __init__(self, default_grant=None, oidc_grant=None): self.default_grant = default_grant @@ -51,9 +57,11 @@ class ImplicitTokenGrantDispatcher(Dispatcher): return handler def create_authorization_response(self, request, token_handler): + """Read scope and route to the designated handler.""" return self._handler_for_request(request).create_authorization_response(request, token_handler) def validate_authorization_request(self, request): + """Read scope and route to the designated handler.""" return self._handler_for_request(request).validate_authorization_request(request) @@ -87,5 +95,6 @@ class AuthorizationTokenGrantDispatcher(Dispatcher): return handler def create_token_response(self, request, token_handler): + """Read scope and route to the designated handler.""" handler = self._handler_for_request(request) return handler.create_token_response(request, token_handler) |