Skip to content

Commit 9b78033

Browse files
committed
Fix NimbusJwtDecoder.withJwkSetUri to populate default algorithms from JWK Set
Closes: gh-17785 Signed-off-by: Andrey Litvitski <[email protected]>
1 parent 7ce2bdd commit 9b78033

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusJwtDecoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
* @author Joe Grandja
8585
* @author Mykyta Bezverkhyi
8686
* @author Daeho Kwon
87+
* @author Andrey Litvitski
8788
* @since 5.2
8889
*/
8990
public final class NimbusJwtDecoder implements JwtDecoder {
@@ -240,7 +241,7 @@ public static JwkSetUriJwtDecoderBuilder withIssuerLocation(String issuer) {
240241
* @return a {@link JwkSetUriJwtDecoderBuilder} for further configurations
241242
*/
242243
public static JwkSetUriJwtDecoderBuilder withJwkSetUri(String jwkSetUri) {
243-
return new JwkSetUriJwtDecoderBuilder(jwkSetUri);
244+
return new JwkSetUriJwtDecoderBuilder((__) -> jwkSetUri, JwtDecoderProviderConfigurationUtils::getJWSAlgorithms);
244245
}
245246

246247
/**

0 commit comments

Comments
 (0)