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

Commit 0e25a24

Browse files
committed
Missed adding this.
1 parent 2939a63 commit 0e25a24

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import logging
2+
3+
from oidcendpoint.user_info import SCOPE2CLAIMS
4+
5+
LOGGER = logging.getLogger(__name__)
6+
7+
8+
def add_custom_scopes(endpoint, **kwargs):
9+
userinfo_endpoint = endpoint['userinfo']
10+
11+
_scopes = SCOPE2CLAIMS.copy()
12+
_scopes.update(kwargs)
13+
14+
userinfo_endpoint.scope_to_claims = _scopes
15+
userinfo_endpoint.endpoint_context.idtoken.scope_to_claims = _scopes
16+
userinfo_endpoint.endpoint_context.scope2claims = _scopes

0 commit comments

Comments
 (0)