You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UA-4020 | Pulled in changes from upstream 0.8.3 (#14)
* Update settings.rst
* Update LICENSE
* Default ordering RSA keys + example app for Django 4.2
* Update docs
* Update docs
* Work on end_session_endpoint
* Work on end_session_endpoint
* Work on end_session_endpoint
* Work on end_session_endpoint
* Work on end_session_endpoint
* Work on end_session_endpoint
* Work on end_session_endpoint
* Fix create_id_token with extra scope claims + add ruff as formatter.
* Fix create_id_token with extra scope claims + add ruff as formatter.
* Fix create_id_token with extra scope claims + add ruff as formatter.
* Bump version 0.8.3
* UA-4020 | reducing the diff between ours/theirs where its reasonable.
* UA-4020 | reducing the diff between ours/theirs where its reasonable.
* UA-4020 | reducing the diff between ours/theirs where its reasonable.
---------
Co-authored-by: Juan Ignacio Fiorentino <[email protected]>
Co-authored-by: juanifioren <[email protected]>
Copy file name to clipboardExpand all lines: docs/sections/scopesclaims.rst
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,3 +111,11 @@ Inside your oidc_provider_settings.py file add the following class::
111
111
112
112
.. note::
113
113
If a field is empty or ``None`` inside the dictionary you return on the ``scope_scopename`` method, it will be cleaned from the response.
114
+
115
+
Include claims in the ID Token
116
+
==============================
117
+
118
+
The draft specifies that ID Tokens MAY include additional claims. You can add claims to the ID Token using ``OIDC_IDTOKEN_INCLUDE_CLAIMS``. Note that the claims will be filtered based on the token's scope.
119
+
120
+
.. note::
121
+
Any extra claims defined with ``OIDC_EXTRA_SCOPE_CLAIMS`` will also be included.
Copy file name to clipboardExpand all lines: docs/sections/sessionmanagement.rst
+41-18Lines changed: 41 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,47 @@ Somewhere in your Django ``settings.py``::
22
22
If you're in a multi-server setup, you might also want to add ``OIDC_UNAUTHENTICATED_SESSION_MANAGEMENT_KEY`` to your settings and set it to some random but fixed string. While authenticated clients have a session that can be used to calculate the browser state, there is no such thing for unauthenticated clients. Hence this value. By default a value is generated randomly on startup, so this will be different on each server. To get a consistent value across all servers you should set this yourself.
23
23
24
24
25
+
RP-Initiated Logout
26
+
===================
27
+
28
+
An RP can notify the OP that the End-User has logged out of the site, and might want to log out of the OP as well. In this case, the RP, after having logged the End-User out of the RP, redirects the End-User's User Agent to the OP's logout endpoint URL.
29
+
30
+
This URL is normally obtained via the ``end_session_endpoint`` element of the OP's Discovery response.
31
+
32
+
Parameters that are passed as query parameters in the logout request:
33
+
34
+
* ``id_token_hint``
35
+
RECOMMENDED. Previously issued ID Token passed to the logout endpoint as a hint about the End-User's current authenticated session with the Client.
36
+
* ``post_logout_redirect_uri``
37
+
OPTIONAL. URL to which the RP is requesting that the End-User's User Agent be redirected after a logout has been performed.
38
+
39
+
The value must be a valid, encoded URL that has been registered in the list of "Post Logout Redirect URIs" in your Client (RP) page.
40
+
* ``state``
41
+
OPTIONAL. Opaque value used by the RP to maintain state between the logout request and the callback to the endpoint specified by the ``post_logout_redirect_uri`` query parameter.
The standard defines that the logout flow should be interrupted to prompt the user for consent if the OpenID provider cannot verify that the request was made by the user.
50
+
51
+
We enforce this behavior by displaying a logout consent prompt if it detects any of the following conditions:
52
+
53
+
* If ``id_token_hint`` is not present or is invalid (we could not validate the client from it).
54
+
* If ``post_logout_redirect_uri`` is not registered in the list of "Post Logout Redirect URIs".
55
+
56
+
If the user confirms the logout request, we continue the logout flow. To modify the logout consent template create your own ``oidc_provider/end_session_prompt.html``.
57
+
58
+
**Other scenarios**
59
+
60
+
In some cases, there may be no valid redirect URI for the user after logging out (e.g., the OP could not find a post-logout URI). If the user ends up being logged out, the system will render the ``oidc_provider/end_session_completed.html`` template.
61
+
62
+
On the other hand, if the session remains active for any reason, the ``oidc_provider/end_session_failed.html`` template will be used.
63
+
64
+
Both templates will receive the ``{{ client }}`` variable in their context.
65
+
25
66
Example RP iframe
26
67
=================
27
68
@@ -70,22 +111,4 @@ Example RP iframe
70
111
</script>
71
112
</html>
72
113
73
-
RP-Initiated Logout
74
-
===================
75
-
76
-
An RP can notify the OP that the End-User has logged out of the site, and might want to log out of the OP as well. In this case, the RP, after having logged the End-User out of the RP, redirects the End-User's User Agent to the OP's logout endpoint URL.
77
-
78
-
This URL is normally obtained via the ``end_session_endpoint`` element of the OP's Discovery response.
79
-
80
-
Parameters that are passed as query parameters in the logout request:
81
-
82
-
* ``id_token_hint``
83
-
Previously issued ID Token passed to the logout endpoint as a hint about the End-User's current authenticated session with the Client.
84
-
* ``post_logout_redirect_uri``
85
-
URL to which the RP is requesting that the End-User's User Agent be redirected after a logout has been performed.
86
-
* ``state``
87
-
OPTIONAL. Opaque value used by the RP to maintain state between the logout request and the callback to the endpoint specified by the ``post_logout_redirect_uri`` query parameter.
0 commit comments