|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2023 the original author or authors. |
| 2 | + * Copyright 2002-2024 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -91,7 +91,7 @@ public final class ReactiveOidcIdTokenDecoderFactory implements ReactiveJwtDecod
|
91 | 91 | private Function<ClientRegistration, Converter<Map<String, Object>, Map<String, Object>>> claimTypeConverterFactory = (
|
92 | 92 | clientRegistration) -> DEFAULT_CLAIM_TYPE_CONVERTER;
|
93 | 93 |
|
94 |
| - private Function<ClientRegistration, WebClient> webClientResolver = (clientRegistration) -> WebClient.create(); |
| 94 | + private Function<ClientRegistration, WebClient> webClientFactory = (clientRegistration) -> WebClient.create(); |
95 | 95 |
|
96 | 96 | /**
|
97 | 97 | * Returns the default {@link Converter}'s used for type conversion of claim values
|
@@ -168,7 +168,7 @@ private NimbusReactiveJwtDecoder buildDecoder(ClientRegistration clientRegistrat
|
168 | 168 | throw new OAuth2AuthenticationException(oauth2Error, oauth2Error.toString());
|
169 | 169 | }
|
170 | 170 | return NimbusReactiveJwtDecoder.withJwkSetUri(jwkSetUri).jwsAlgorithm((SignatureAlgorithm) jwsAlgorithm)
|
171 |
| - .webClient(this.webClientResolver.apply(clientRegistration)).build(); |
| 171 | + .webClient(this.webClientFactory.apply(clientRegistration)).build(); |
172 | 172 | }
|
173 | 173 | if (jwsAlgorithm != null && MacAlgorithm.class.isAssignableFrom(jwsAlgorithm.getClass())) {
|
174 | 174 | // https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation
|
@@ -248,12 +248,13 @@ public void setClaimTypeConverterFactory(
|
248 | 248 | * {@link NimbusReactiveJwtDecoder}. The default resolver provides {@link WebClient}
|
249 | 249 | * that is created by {@code WebClient.create()}. This is optional method if we need
|
250 | 250 | * to set custom web client in {@link NimbusReactiveJwtDecoder}.
|
251 |
| - * @param webClientResolver a function that will provide {@link WebClient} for a |
| 251 | + * @param webClientFactory a function that will provide {@link WebClient} for a |
252 | 252 | * {@link ClientRegistration}
|
| 253 | + * @since 6.3 |
253 | 254 | */
|
254 |
| - public void setWebClientResolver(Function<ClientRegistration, WebClient> webClientResolver) { |
255 |
| - Assert.notNull(webClientResolver, "webClientResolver cannot be null"); |
256 |
| - this.webClientResolver = webClientResolver; |
| 255 | + public void setWebClientFactory(Function<ClientRegistration, WebClient> webClientFactory) { |
| 256 | + Assert.notNull(webClientFactory, "webClientFactory cannot be null"); |
| 257 | + this.webClientFactory = webClientFactory; |
257 | 258 | }
|
258 | 259 |
|
259 | 260 | }
|
0 commit comments