Class OAuth2WebClientHttpServiceGroupConfigurer
java.lang.Object
org.springframework.security.oauth2.client.web.reactive.function.client.support.OAuth2WebClientHttpServiceGroupConfigurer
- All Implemented Interfaces:
org.springframework.core.Ordered,org.springframework.web.reactive.function.client.support.WebClientHttpServiceGroupConfigurer,org.springframework.web.service.registry.HttpServiceGroupConfigurer<org.springframework.web.reactive.function.client.WebClient.Builder>
public final class OAuth2WebClientHttpServiceGroupConfigurer
extends Object
implements org.springframework.web.reactive.function.client.support.WebClientHttpServiceGroupConfigurer
Simplify adding OAuth2 support to interface based rest clients that use
WebClient.- Since:
- 7.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.web.service.registry.HttpServiceGroupConfigurer
org.springframework.web.service.registry.HttpServiceGroupConfigurer.ClientCallback<CB extends Object>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.GroupCallback<CB extends Object>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.Groups<CB extends Object>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.InitializingClientCallback<CB extends Object>, org.springframework.web.service.registry.HttpServiceGroupConfigurer.ProxyFactoryCallback -
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureGroups(org.springframework.web.service.registry.HttpServiceGroupConfigurer.Groups<org.springframework.web.reactive.function.client.WebClient.Builder> groups) from(OAuth2AuthorizedClientManager authorizedClientManager) Create an instance for Servlet based environments from the providedOAuth2AuthorizedClientManager.from(ReactiveOAuth2AuthorizedClientManager authorizedClientManager) Create an instance for Reactive web applications from the providedReactiveOAuth2AuthorizedClientManager.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.service.registry.HttpServiceGroupConfigurer
getOrder
-
Method Details
-
configureGroups
public void configureGroups(org.springframework.web.service.registry.HttpServiceGroupConfigurer.Groups<org.springframework.web.reactive.function.client.WebClient.Builder> groups) - Specified by:
configureGroupsin interfaceorg.springframework.web.service.registry.HttpServiceGroupConfigurer<org.springframework.web.reactive.function.client.WebClient.Builder>
-
from
public static OAuth2WebClientHttpServiceGroupConfigurer from(ReactiveOAuth2AuthorizedClientManager authorizedClientManager) Create an instance for Reactive web applications from the providedReactiveOAuth2AuthorizedClientManager. It will addServerOAuth2AuthorizedClientExchangeFilterFunctionto theWebClientandClientRegistrationIdProcessorto theHttpServiceProxyFactory.- Parameters:
authorizedClientManager- the manager to use.- Returns:
- the
OAuth2WebClientHttpServiceGroupConfigurer.
-
from
public static OAuth2WebClientHttpServiceGroupConfigurer from(OAuth2AuthorizedClientManager authorizedClientManager) Create an instance for Servlet based environments from the providedOAuth2AuthorizedClientManager. It will addServletOAuth2AuthorizedClientExchangeFilterFunctionto theWebClientandClientRegistrationIdProcessorto theHttpServiceProxyFactory.- Parameters:
authorizedClientManager- the manager to use.- Returns:
- the
OAuth2WebClientHttpServiceGroupConfigurer.
-