NimbusJwtDecoderJwkSetUriBuilder should discover supported algorithms #7269
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: duplicate
A duplicate of another issue
Related to #6883
When
NimbusJwtDecoder#withJwkSetUri
is invoked, the builder assumesRS256
if no algorithm is specified.However, since this is based on the JWK Set, this is something that the builder can discover by querying the JWK Set endpoint.
Nimbus supports a feature like this:
If the application doesn't specify an algorithm, it would be nice to enhance the builder to discover the algorithms by hitting the JWK Set endpoint.
This also has the nice outcome that
JwtDecoders.fromIssuerLocation
would now be applicable for more than justRS256
, which is currently not configurable.Note that it'd be important to hit this endpoint lazily, so that it doesn't slow down startup.
The text was updated successfully, but these errors were encountered: