Package org.springframework.security.config.web.server

# Class ServerHttpSecurity.OAuth2ClientSpec

java.lang.Object
org.springframework.security.config.web.server.ServerHttpSecurity.OAuth2ClientSpec

Enclosing class:
  ServerHttpSecurity

public final class ServerHttpSecurity.OAuth2ClientSpec extends Object

## Method Summary

Modifier and Type
Method
Description
`ServerHttpSecurity`
`and()`
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0.
`ServerHttpSecurity.OAuth2ClientSpec`
`authenticationConverter(org.springframework.security.web.server.authentication.ServerAuthenticationConverter authenticationConverter)`
Sets the converter to use
`ServerHttpSecurity.OAuth2ClientSpec`
`authenticationManager(org.springframework.security.authentication.ReactiveAuthenticationManager authenticationManager)`
Configures the `ReactiveAuthenticationManager` to use.
`ServerHttpSecurity.OAuth2ClientSpec`
`authorizationRedirectStrategy(org.springframework.security.web.server.ServerRedirectStrategy authorizationRedirectStrategy)`
Sets the redirect strategy for Authorization Endpoint redirect URI.
`ServerHttpSecurity.OAuth2ClientSpec`
`authorizationRequestRepository(org.springframework.security.oauth2.client.web.server.ServerAuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest> authorizationRequestRepository)`
Sets the repository to use for storing `OAuth2AuthorizationRequest`'s.
`ServerHttpSecurity.OAuth2ClientSpec`
`authorizationRequestResolver(org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizationRequestResolver authorizationRequestResolver)`
Sets the resolver used for resolving `OAuth2AuthorizationRequest`'s.
`ServerHttpSecurity.OAuth2ClientSpec`
`authorizedClientRepository(org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizedClientRepository authorizedClientRepository)`
Configures the `ReactiveClientRegistrationRepository`.
`ServerHttpSecurity.OAuth2ClientSpec`
`clientRegistrationRepository(org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository clientRegistrationRepository)`
Configures the `ReactiveClientRegistrationRepository`.
`protected void`
`configure(ServerHttpSecurity http)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### authenticationConverter

public ServerHttpSecurity.OAuth2ClientSpec authenticationConverter(org.springframework.security.web.server.authentication.ServerAuthenticationConverter authenticationConverter)
Sets the converter to use

Parameters:
  `authenticationConverter` - the converter to use
Returns:
  the `ServerHttpSecurity.OAuth2ClientSpec` to customize

### authenticationManager

public ServerHttpSecurity.OAuth2ClientSpec authenticationManager(org.springframework.security.authentication.ReactiveAuthenticationManager authenticationManager)
Configures the `ReactiveAuthenticationManager` to use. The default is `OAuth2AuthorizationCodeReactiveAuthenticationManager`

Parameters:
  `authenticationManager` - the manager to use
Returns:
  the `ServerHttpSecurity.OAuth2ClientSpec` to customize

### clientRegistrationRepository

public ServerHttpSecurity.OAuth2ClientSpec clientRegistrationRepository(org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository clientRegistrationRepository)
Configures the `ReactiveClientRegistrationRepository`. Default is to look the value up as a Bean.

Parameters:
  `clientRegistrationRepository` - the repository to use
Returns:
  the `ServerHttpSecurity.OAuth2ClientSpec` to customize

### authorizedClientRepository

public ServerHttpSecurity.OAuth2ClientSpec authorizedClientRepository(org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizedClientRepository authorizedClientRepository)
Configures the `ReactiveClientRegistrationRepository`. Default is to look the value up as a Bean.

Parameters:
  `authorizedClientRepository` - the repository to use
Returns:
  the `ServerHttpSecurity.OAuth2ClientSpec` to customize

### authorizationRequestRepository

public ServerHttpSecurity.OAuth2ClientSpec authorizationRequestRepository(org.springframework.security.oauth2.client.web.server.ServerAuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest> authorizationRequestRepository)
Sets the repository to use for storing `OAuth2AuthorizationRequest`'s.

Parameters:
  `authorizationRequestRepository` - the repository to use for storing `OAuth2AuthorizationRequest`'s
Returns:
  the `ServerHttpSecurity.OAuth2ClientSpec` to customize
Since:
  5.2

### authorizationRequestResolver

public ServerHttpSecurity.OAuth2ClientSpec authorizationRequestResolver(org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizationRequestResolver authorizationRequestResolver)
Sets the resolver used for resolving `OAuth2AuthorizationRequest`'s.

Parameters:
  `authorizationRequestResolver` - the resolver used for resolving `OAuth2AuthorizationRequest`'s
Returns:
  the `ServerHttpSecurity.OAuth2ClientSpec` to customize
Since:
  6.1

### authorizationRedirectStrategy

public ServerHttpSecurity.OAuth2ClientSpec authorizationRedirectStrategy(org.springframework.security.web.server.ServerRedirectStrategy authorizationRedirectStrategy)
Sets the redirect strategy for Authorization Endpoint redirect URI.

Parameters:
  `authorizationRedirectStrategy` - the redirect strategy
Returns:
  the `ServerHttpSecurity.OAuth2ClientSpec` for further configuration

### and

@Deprecated(since="6.1", forRemoval=true) public ServerHttpSecurity and()
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0. Use `ServerHttpSecurity.oauth2Client(Customizer)` or `oauth2Client(Customizer.withDefaults())` to stick with defaults. See the documentation for more details.
Allows method chaining to continue configuring the `ServerHttpSecurity`

Returns:
  the `ServerHttpSecurity` to continue configuring

### configure

protected void configure(ServerHttpSecurity http)