Skip to content

Commit 1a1c55c

Browse files
committed
Fix create_id_token with extra scope claims + add ruff as formatter.
1 parent 1756c20 commit 1a1c55c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/sections/scopesclaims.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,11 @@ Inside your oidc_provider_settings.py file add the following class::
111111

112112
.. note::
113113
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.

docs/sections/settings.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Read more about how to implement it in :ref:`scopesclaims` section.
8181
OIDC_IDTOKEN_INCLUDE_CLAIMS
8282
==============================
8383

84-
OPTIONAL. ``bool``. If enabled, id_token will include standard claims of the user (email, first name, etc.).
84+
OPTIONAL. ``bool``. If enabled, id_token will include standard (and extra if defined) claims of the user (email, first name, etc.).
8585

8686
Default is ``False``.
8787

0 commit comments

Comments
 (0)