Class ServerHttpSecurity.OAuth2ClientSpec
java.lang.Object
org.springframework.security.config.web.server.ServerHttpSecurity.OAuth2ClientSpec
- Enclosing class:
- ServerHttpSecurity
-
Method Summary
Modifier and TypeMethodDescriptionand()Deprecated, for removal: This API element is subject to removal in a future version.For removal in 7.0.authenticationConverter(ServerAuthenticationConverter authenticationConverter) Sets the converter to useauthenticationManager(ReactiveAuthenticationManager authenticationManager) Configures theReactiveAuthenticationManagerto use.authorizationRedirectStrategy(ServerRedirectStrategy authorizationRedirectStrategy) Sets the redirect strategy for Authorization Endpoint redirect URI.authorizationRequestRepository(ServerAuthorizationRequestRepository<OAuth2AuthorizationRequest> authorizationRequestRepository) Sets the repository to use for storingOAuth2AuthorizationRequest's.authorizationRequestResolver(ServerOAuth2AuthorizationRequestResolver authorizationRequestResolver) Sets the resolver used for resolvingOAuth2AuthorizationRequest's.authorizedClientRepository(ServerOAuth2AuthorizedClientRepository authorizedClientRepository) Configures theReactiveClientRegistrationRepository.clientRegistrationRepository(ReactiveClientRegistrationRepository clientRegistrationRepository) Configures theReactiveClientRegistrationRepository.protected voidconfigure(ServerHttpSecurity http)
-
Method Details
-
authenticationConverter
public ServerHttpSecurity.OAuth2ClientSpec authenticationConverter(ServerAuthenticationConverter authenticationConverter) Sets the converter to use- Parameters:
authenticationConverter- the converter to use- Returns:
- the
ServerHttpSecurity.OAuth2ClientSpecto customize
-
authenticationManager
public ServerHttpSecurity.OAuth2ClientSpec authenticationManager(ReactiveAuthenticationManager authenticationManager) Configures theReactiveAuthenticationManagerto use. The default isOAuth2AuthorizationCodeReactiveAuthenticationManager- Parameters:
authenticationManager- the manager to use- Returns:
- the
ServerHttpSecurity.OAuth2ClientSpecto customize
-
clientRegistrationRepository
public ServerHttpSecurity.OAuth2ClientSpec clientRegistrationRepository(ReactiveClientRegistrationRepository clientRegistrationRepository) Configures theReactiveClientRegistrationRepository. Default is to look the value up as a Bean.- Parameters:
clientRegistrationRepository- the repository to use- Returns:
- the
ServerHttpSecurity.OAuth2ClientSpecto customize
-
authorizedClientRepository
public ServerHttpSecurity.OAuth2ClientSpec authorizedClientRepository(ServerOAuth2AuthorizedClientRepository authorizedClientRepository) Configures theReactiveClientRegistrationRepository. Default is to look the value up as a Bean.- Parameters:
authorizedClientRepository- the repository to use- Returns:
- the
ServerHttpSecurity.OAuth2ClientSpecto customize
-
authorizationRequestRepository
public ServerHttpSecurity.OAuth2ClientSpec authorizationRequestRepository(ServerAuthorizationRequestRepository<OAuth2AuthorizationRequest> authorizationRequestRepository) Sets the repository to use for storingOAuth2AuthorizationRequest's.- Parameters:
authorizationRequestRepository- the repository to use for storingOAuth2AuthorizationRequest's- Returns:
- the
ServerHttpSecurity.OAuth2ClientSpecto customize - Since:
- 5.2
-
authorizationRequestResolver
public ServerHttpSecurity.OAuth2ClientSpec authorizationRequestResolver(ServerOAuth2AuthorizationRequestResolver authorizationRequestResolver) Sets the resolver used for resolvingOAuth2AuthorizationRequest's.- Parameters:
authorizationRequestResolver- the resolver used for resolvingOAuth2AuthorizationRequest's- Returns:
- the
ServerHttpSecurity.OAuth2ClientSpecto customize - Since:
- 6.1
-
authorizationRedirectStrategy
public ServerHttpSecurity.OAuth2ClientSpec authorizationRedirectStrategy(ServerRedirectStrategy authorizationRedirectStrategy) Sets the redirect strategy for Authorization Endpoint redirect URI.- Parameters:
authorizationRedirectStrategy- the redirect strategy- Returns:
- the
ServerHttpSecurity.OAuth2ClientSpecfor further configuration
-
and
Deprecated, for removal: This API element is subject to removal in a future version.For removal in 7.0. UseServerHttpSecurity.oauth2Client(Customizer)oroauth2Client(Customizer.withDefaults())to stick with defaults. See the documentation for more details.Allows method chaining to continue configuring theServerHttpSecurity- Returns:
- the
ServerHttpSecurityto continue configuring
-
configure
-