Package org.springframework.security.config.annotation.web.configurers.oauth2.client

# Class OAuth2ClientConfigurer.AuthorizationCodeGrantConfigurer

java.lang.Object
org.springframework.security.config.annotation.web.configurers.oauth2.client.OAuth2ClientConfigurer.AuthorizationCodeGrantConfigurer

Enclosing class:
  OAuth2ClientConfigurer<B extends HttpSecurityBuilder<B>>

public final class OAuth2ClientConfigurer.AuthorizationCodeGrantConfigurer extends Object
Configuration options for the OAuth 2.0 Authorization Code Grant.

## Method Summary

Modifier and Type
Method
Description
`OAuth2ClientConfigurer<B>.AuthorizationCodeGrantConfigurer`
`accessTokenResponseClient(org.springframework.security.oauth2.client.endpoint.OAuth2AccessTokenResponseClient<org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequest> accessTokenResponseClient)`
Sets the client used for requesting the access token credential from the Token Endpoint.
`OAuth2ClientConfigurer<B>`
`and()`
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0.
`OAuth2ClientConfigurer<B>.AuthorizationCodeGrantConfigurer`
`authorizationRedirectStrategy(org.springframework.security.web.RedirectStrategy authorizationRedirectStrategy)`
Sets the redirect strategy for Authorization Endpoint redirect URI.
`OAuth2ClientConfigurer<B>.AuthorizationCodeGrantConfigurer`
`authorizationRequestRepository(org.springframework.security.oauth2.client.web.AuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest> authorizationRequestRepository)`
Sets the repository used for storing `OAuth2AuthorizationRequest`'s.
`OAuth2ClientConfigurer<B>.AuthorizationCodeGrantConfigurer`
`authorizationRequestResolver(org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver authorizationRequestResolver)`
Sets the resolver used for resolving `OAuth2AuthorizationRequest`'s.

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

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

## Method Details

### authorizationRequestResolver

public OAuth2ClientConfigurer<B>.AuthorizationCodeGrantConfigurer authorizationRequestResolver(org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestResolver authorizationRequestResolver)
Sets the resolver used for resolving `OAuth2AuthorizationRequest`'s.

Parameters:
  `authorizationRequestResolver` - the resolver used for resolving `OAuth2AuthorizationRequest`'s
Returns:
  the `OAuth2ClientConfigurer<B extends HttpSecurityBuilder<B>>.AuthorizationCodeGrantConfigurer` for further configuration

### authorizationRequestRepository

public OAuth2ClientConfigurer<B>.AuthorizationCodeGrantConfigurer authorizationRequestRepository(org.springframework.security.oauth2.client.web.AuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest> authorizationRequestRepository)
Sets the repository used for storing `OAuth2AuthorizationRequest`'s.

Parameters:
  `authorizationRequestRepository` - the repository used for storing `OAuth2AuthorizationRequest`'s
Returns:
  the `OAuth2ClientConfigurer<B extends HttpSecurityBuilder<B>>.AuthorizationCodeGrantConfigurer` for further configuration

### authorizationRedirectStrategy

public OAuth2ClientConfigurer<B>.AuthorizationCodeGrantConfigurer authorizationRedirectStrategy(org.springframework.security.web.RedirectStrategy authorizationRedirectStrategy)
Sets the redirect strategy for Authorization Endpoint redirect URI.

Parameters:
  `authorizationRedirectStrategy` - the redirect strategy
Returns:
  the `OAuth2ClientConfigurer<B extends HttpSecurityBuilder<B>>.AuthorizationCodeGrantConfigurer` for further configuration

### accessTokenResponseClient

public OAuth2ClientConfigurer<B>.AuthorizationCodeGrantConfigurer accessTokenResponseClient(org.springframework.security.oauth2.client.endpoint.OAuth2AccessTokenResponseClient<org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationCodeGrantRequest> accessTokenResponseClient)
Sets the client used for requesting the access token credential from the Token Endpoint.

Parameters:
  `accessTokenResponseClient` - the client used for requesting the access token credential from the Token Endpoint
Returns:
  the `OAuth2ClientConfigurer<B extends HttpSecurityBuilder<B>>.AuthorizationCodeGrantConfigurer` for further configuration

### and

@Deprecated(since="6.1", forRemoval=true) public OAuth2ClientConfigurer<B> and()
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0. Use `OAuth2ClientConfigurer.authorizationCodeGrant(Customizer)` instead
Returns the `OAuth2ClientConfigurer` for further configuration.

Returns:
  the `OAuth2ClientConfigurer`