File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ class OAuthMetadata(BaseModel):
114
114
registration_endpoint : AnyHttpUrl | None = None
115
115
scopes_supported : list [str ] | None = None
116
116
response_types_supported : list [str ] = ["code" ]
117
- response_modes_supported : list [Literal [ "query" , "fragment" , "form_post" ] ] | None = None
117
+ response_modes_supported : list [str ] | None = None
118
118
grant_types_supported : list [str ] | None = None
119
119
token_endpoint_auth_methods_supported : list [str ] | None = None
120
120
token_endpoint_auth_signing_alg_values_supported : list [str ] | None = None
Original file line number Diff line number Diff line change @@ -37,3 +37,25 @@ def test_oidc(self):
37
37
"userinfo_endpoint" : "https://example.com/oauth2/userInfo" ,
38
38
}
39
39
)
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
+ )
You can’t perform that action at this time.
0 commit comments