Description
Summary
When using ClientRegistrations.fromIssuerLocation for setting up Oauth2 AuthorizationServer the code requires jwks url to be a part of the returned metadata in the .well-known/oauth-authorization-server even though this is not required in the metadata spec (see https://tools.ietf.org/html/rfc8414)
Actual Behavior
Nullpointer thrown from line 222 (.jwkSetUri(metadata.getJWKSetURI().toASCIIString())) in org.springframework.security.oauth2.client.registration.ClientRegistrations
Expected Behavior
No nullpointer and the client configured correctly with the provided metadata
Configuration
Here is an example metadata file that should work
{
"issuer": "https://issuerurl:port",
"authorization_endpoint": "https://issuerurl:port/oauth/authorize",
"token_endpoint": "https://issuerurl:port/oauth/token",
"scopes_supported": [
"user:check-access",
"user:full",
"user:info",
"user:list-projects",
"user:list-scoped-projects"
],
"response_types_supported": [
"code",
"token"
],
"grant_types_supported": [
"authorization_code",
"implicit"
],
"code_challenge_methods_supported": [
"plain",
"S256"
]
}
Version
Spring Securiy Oauth2 Client 5.2.0.RELEASE