Skip to content

Commit ca468d8

Browse files
committed
fix: request_object_signing_alg_values_supported 'none' and 'RS256'
values are optional. oidc-discovery indicates that 'Servers SHOULD support none and RS256.' but RFC2119 indicates that 'SHOULD' is synonym of 'RECOMMENDED' and not of 'REQUIRED'
1 parent 4eafdc2 commit ca468d8

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

authlib/oidc/discovery/models.py

-7
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,6 @@ def validate_request_object_signing_alg_values_supported(self):
159159
'"request_object_signing_alg_values_supported" MUST be JSON array'
160160
)
161161

162-
# Servers SHOULD support none and RS256
163-
if "none" not in values or "RS256" not in values:
164-
raise ValueError(
165-
'"request_object_signing_alg_values_supported" '
166-
"SHOULD support none and RS256"
167-
)
168-
169162
def validate_request_object_encryption_alg_values_supported(self):
170163
"""OPTIONAL. JSON array containing a list of the JWE encryption
171164
algorithms (alg values) supported by the OP for Request Objects.

tests/core/test_oidc/test_discovery.py

-6
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,6 @@ def test_validate_request_object_signing_alg_values_supported(self):
9494
self._call_validate_array(
9595
"request_object_signing_alg_values_supported", ["none", "RS256"]
9696
)
97-
metadata = OpenIDProviderMetadata(
98-
{"request_object_signing_alg_values_supported": ["RS512"]}
99-
)
100-
with self.assertRaises(ValueError) as cm:
101-
metadata.validate_request_object_signing_alg_values_supported()
102-
self.assertIn("SHOULD support none and RS256", str(cm.exception))
10397

10498
def test_validate_request_object_encryption_alg_values_supported(self):
10599
self._call_validate_array(

0 commit comments

Comments
 (0)