Skip to content

Commit 5dcf76d

Browse files
author
Ioannis Kakavas
committed
Ignore unsupported scopes instead of failing
According to https://openid.net/specs/openid-connect-core-1_0.html 3.1.2.1 : " Scope values used that are not understood by an implementation SHOULD be ignored" Unsupported scopes are handled gracefully already in https://github.com/OpenIDC/pyoidc/blob/master/src/oic/oic/__init__.py#L1773
1 parent 1275072 commit 5dcf76d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/pyop/request_validator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,8 @@ def requested_scope_is_supported(provider, authentication_request):
9696
supported_scopes = set(provider.provider_configuration['scopes_supported'])
9797
requested_unsupported_scopes = requested_scopes - supported_scopes
9898
if requested_unsupported_scopes:
99-
raise InvalidAuthenticationRequest('Request contains unsupported/unknown scopes: {}'
100-
.format(', '.join(requested_unsupported_scopes)),
101-
authentication_request, oauth_error='invalid_scope')
99+
logger.warning('Request contains unsupported/unknown scopes: {}'
100+
.format(', '.join(requested_unsupported_scopes)))
102101

103102

104103
def registration_request_verify(registration_request):

0 commit comments

Comments
 (0)