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

[WiP][ProviderInfoDiscovery] Keep unknown scopes #11

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/oidcservice/oidc/provider_info_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def match_preferences(self, pcr=None, issuer=None):
"""

if not pcr:
# OP capabilities here
pcr = self.service_context.get('provider_info')

regreq = oidc.RegistrationRequest
Expand Down Expand Up @@ -137,7 +138,10 @@ def match_preferences(self, pcr=None, issuer=None):
except KeyError:
# Allow non standard claims
if isinstance(vals, list):
_behaviour[_pref] = [v for v in vals if v in _pvals]
# "if v in _pvals" would be adopted
# a RP relying on oidcService will discard those
# who not are available in op's provider discovery endpoint
_behaviour[_pref] = [v for v in vals] # if v in _pvals]
elif vals in _pvals:
_behaviour[_pref] = vals
else:
Expand Down