@@ -99,6 +99,7 @@ public ResponseEntity<?> metadata(UriComponentsBuilder uriBuilder, HttpServletRe
99
99
String urlPrefix = uriBuilder .replacePath (null ).build ().encode ().toUriString ();
100
100
Map <String , Object > m = new LinkedHashMap <>();
101
101
// https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
102
+ // https://tools.ietf.org/html/rfc8414#section-2
102
103
m .put ("issuer" , urlPrefix + "/" ); // REQUIRED
103
104
m .put ("authorization_endpoint" , urlPrefix + AUTHORIZATION_ENDPOINT ); // REQUIRED
104
105
m .put ("token_endpoint" , urlPrefix + TOKEN_ENDPOINT ); // REQUIRED unless only the Implicit Flow is used
@@ -107,9 +108,11 @@ public ResponseEntity<?> metadata(UriComponentsBuilder uriBuilder, HttpServletRe
107
108
m .put ("introspection_endpoint" , urlPrefix + INTROSPECTION_ENDPOINT );
108
109
m .put ("scopes_supported" , Arrays .asList ("openid" , "profile" , "email" )); // RECOMMENDED
109
110
m .put ("response_types_supported" , Arrays .asList ("id_token token" , "code" )); // REQUIRED
111
+ m .put ("grant_types_supported" , Arrays .asList ("authorization_code" , "implicit" )); //OPTIONAL
110
112
m .put ("subject_types_supported" , Collections .singletonList ("public" )); // REQUIRED
111
113
m .put ("id_token_signing_alg_values_supported" , Arrays .asList ("RS256" , "none" )); // REQUIRED
112
114
m .put ("claims_supported" , Arrays .asList ("sub" , "iss" , "name" , "family_name" , "given_name" , "preferred_username" , "email" ));
115
+ m .put ("code_challenge_methods_supported" , Arrays .asList ("plain" , "S256" )); // PKCE support advertised
113
116
return ResponseEntity .ok ().body (m );
114
117
}
115
118
0 commit comments