Remove strict validation on response_modes_supported member of OAuthMetadata (#1243)
Some checks failed
Main branch checks / checks (push) Has been cancelled

This commit is contained in:
joesavage-silabs 2025-08-07 12:39:35 -05:00 • committed by GitHub
commit ef4e167c1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,3 +37,25 @@ class TestOAuthMetadata:
"userinfo_endpoint": "https://example.com/oauth2/userInfo",
}
)
def test_oauth_with_jarm(self):
"""Should not throw when parsing OAuth metadata that includes JARM response modes."""
OAuthMetadata.model_validate(
{
"issuer": "https://example.com",
"authorization_endpoint": "https://example.com/oauth2/authorize",
"token_endpoint": "https://example.com/oauth2/token",
"scopes_supported": ["read", "write"],
"response_types_supported": ["code", "token"],
"response_modes_supported": [
"query",
"fragment",
"form_post",
"query.jwt",
"fragment.jwt",
"form_post.jwt",
"jwt",
],
"token_endpoint_auth_methods_supported": ["client_secret_basic", "client_secret_post"],
}
)