diff options
author | Jonathan Huot <jonathan.huot@gmail.com> | 2019-10-28 16:10:22 +0100 |
---|---|---|
committer | Jonathan Huot <jonathan.huot@gmail.com> | 2019-10-28 16:10:22 +0100 |
commit | ab0de9e28db812eb204f12335b07d91361b16676 (patch) | |
tree | 7ca9857290247e6dc84d7557f2a600c24ef6b8f2 /oauthlib/openid/connect/core/grant_types/dispatchers.py | |
parent | 0c632d8f2955e34818346e96587f9124da449fe1 (diff) | |
download | oauthlib-doc-oidc.tar.gz |
Improved OIDC documentationdoc-oidc
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 541467a..e6a9259 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) |