Skip to content

Commit c140bb6

Browse files
Added test for OAuthMetadata
1 parent 040db01 commit c140bb6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/shared/test_auth.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,25 @@ def test_oidc(self):
3737
"userinfo_endpoint": "https://example.com/oauth2/userInfo",
3838
}
3939
)
40+
41+
def test_oauth_with_jarm(self):
42+
"""Should not throw when parsing OAuth metadata that includes JARM response modes."""
43+
OAuthMetadata.model_validate(
44+
{
45+
"issuer": "https://example.com",
46+
"authorization_endpoint": "https://example.com/oauth2/authorize",
47+
"token_endpoint": "https://example.com/oauth2/token",
48+
"scopes_supported": ["read", "write"],
49+
"response_types_supported": ["code", "token"],
50+
"response_modes_supported": [
51+
"query",
52+
"fragment",
53+
"form_post",
54+
"query.jwt",
55+
"fragment.jwt",
56+
"form_post.jwt",
57+
"jwt",
58+
],
59+
"token_endpoint_auth_methods_supported": ["client_secret_basic", "client_secret_post"],
60+
}
61+
)

0 commit comments

Comments
 (0)