Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
martinr0x committed Nov 3, 2023
1 parent e556844 commit cca8821
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ public final class JwtClientAssertionDecoderFactory implements JwtDecoderFactory
mappings.put(MacAlgorithm.HS512, "HmacSHA512");
JCA_ALGORITHM_MAPPINGS = Collections.unmodifiableMap(mappings);
}
private static final RestTemplate DEFAULT_REST_TEMPLATE = new RestTemplate();
private static final RestTemplate rest = new RestTemplate();
static {
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
requestFactory.setConnectTimeout(15_000);
requestFactory.setReadTimeout(15_000);
DEFAULT_REST_TEMPLATE.setRequestFactory(requestFactory);
rest.setRequestFactory(requestFactory);
}
private final Map<String, JwtDecoder> jwtDecoders = new ConcurrentHashMap<>();
private Function<RegisteredClient, OAuth2TokenValidator<Jwt>> jwtValidatorFactory = DEFAULT_JWT_VALIDATOR_FACTORY;
Expand Down Expand Up @@ -132,7 +132,7 @@ private static NimbusJwtDecoder buildDecoder(RegisteredClient registeredClient)
JWT_CLIENT_AUTHENTICATION_ERROR_URI);
throw new OAuth2AuthenticationException(oauth2Error);
}
return NimbusJwtDecoder.withJwkSetUri(jwkSetUrl).jwsAlgorithm((SignatureAlgorithm) jwsAlgorithm).restOperations(DEFAULT_REST_TEMPLATE).build();
return NimbusJwtDecoder.withJwkSetUri(jwkSetUrl).jwsAlgorithm((SignatureAlgorithm) jwsAlgorithm).restOperations(rest).build();
}
if (jwsAlgorithm instanceof MacAlgorithm) {
String clientSecret = registeredClient.getClientSecret();
Expand Down

0 comments on commit cca8821

Please sign in to comment.