summaryrefslogtreecommitdiff
path: root/oauthlib/openid
diff options
context:
space:
mode:
authorJonathan Huot <JonathanHuot@users.noreply.github.com>2020-01-29 17:10:06 +0100
committerGitHub <noreply@github.com>2020-01-29 17:10:06 +0100
commitb71636e85f845b79b5a56de6480fcba9d1415720 (patch)
tree5ed1b4c947c6debb530ffb5dbb87756a90d31d5b /oauthlib/openid
parent845892c6cff508792bc577ebccda2317bc8434f5 (diff)
parent7f5e92afed0d11536f715245351a3891a2aa5dde (diff)
downloadoauthlib-b71636e85f845b79b5a56de6480fcba9d1415720.tar.gz
Merge pull request #704 from oauthlib/doc-oidc
Improved OIDC documentation
Diffstat (limited to 'oauthlib/openid')
-rw-r--r--oauthlib/openid/connect/core/grant_types/dispatchers.py17
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)