Skip to content

Commit 9065508

Browse files
author
John Van de Meulebrouck Brendgard
committed
Merge remote-tracking branch 'jkakavas/master'
2 parents 1275072 + 64a6dad commit 9065508

2 files changed

Lines changed: 2 additions & 10 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):

tests/pyop/test_provider.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,6 @@ def test_reject_request_with_scope_without_openid(self):
122122
self.provider.parse_authentication_request(urlencode(self.authn_request_args))
123123
assert isinstance(exc.value.__cause__, MissingRequiredValue)
124124

125-
def test_reject_request_with_unknown_scope(self):
126-
self.authn_request_args['scope'] = 'openid unknown'
127-
128-
with pytest.raises(InvalidAuthenticationRequest) as exc:
129-
self.provider.parse_authentication_request(urlencode(self.authn_request_args))
130-
assert exc.value.oauth_error == 'invalid_scope'
131-
132125
def test_custom_validation_hook_reject(self):
133126
class TestException(Exception):
134127
pass

0 commit comments

Comments
 (0)