Skip to content
This repository was archived by the owner on Jun 12, 2021. It is now read-only.

Commit 118e565

Browse files
committed
Add custom scopes to scopes_supported.
1 parent 5128963 commit 118e565

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/oidcendpoint/oidc/add_on/custom_scopes.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,10 @@ def add_custom_scopes(endpoint, **kwargs):
1818
_endpoint.scope_to_claims = _scopes
1919
_endpoint.endpoint_context.idtoken.scope_to_claims = _scopes
2020
_endpoint.endpoint_context.scope2claims = _scopes
21+
22+
# add to defaults
23+
authz_enp = endpoint.get("authorization")
24+
if authz_enp:
25+
_supported = set(authz_enp.default_capabilities['scopes_supported'])
26+
_supported.update(set(kwargs.keys()))
27+
authz_enp.default_capabilities['scopes_supported'] = list(_supported)

0 commit comments

Comments
 (0)