Package org.springframework.security.config.annotation

# Interface SecurityConfigurer<O,B extends SecurityBuilder<O>>

Type Parameters:
  `O` - The object being built by the `SecurityBuilder` B
  `B` - The `SecurityBuilder` that builds objects of type O. This is also the `SecurityBuilder` that is being configured.

All Known Subinterfaces:
  `WebSecurityConfigurer<T>`

All Known Implementing Classes:
  `AbstractAuthenticationFilterConfigurer`, `AbstractDaoAuthenticationConfigurer`, `AbstractHttpConfigurer`, `AbstractInterceptUrlConfigurer`, `AnonymousConfigurer`, `AuthorizeHttpRequestsConfigurer`, `ChannelSecurityConfigurer`, `CorsConfigurer`, `CsrfConfigurer`, `DaoAuthenticationConfigurer`, `DefaultLoginPageConfigurer`, `ExceptionHandlingConfigurer`, `ExpressionUrlAuthorizationConfigurer`, `FormLoginConfigurer`, `GlobalAuthenticationConfigurerAdapter`, `HeadersConfigurer`, `HttpBasicConfigurer`, `InMemoryUserDetailsManagerConfigurer`, `JdbcUserDetailsManagerConfigurer`, `JeeConfigurer`, `LdapAuthenticationProviderConfigurer`, `LogoutConfigurer`, `OAuth2ClientConfigurer`, `OAuth2LoginConfigurer`, `OAuth2ResourceServerConfigurer`, `OidcLogoutConfigurer`, `OneTimeTokenLoginConfigurer`, `PasswordManagementConfigurer`, `PortMapperConfigurer`, `RememberMeConfigurer`, `RequestCacheConfigurer`, `Saml2LoginConfigurer`, `Saml2LogoutConfigurer`, `Saml2MetadataConfigurer`, `SecurityConfigurerAdapter`, `SecurityContextConfigurer`, `ServletApiConfigurer`, `SessionManagementConfigurer`, `UrlAuthorizationConfigurer`, `UserDetailsAwareConfigurer`, `UserDetailsManagerConfigurer`, `UserDetailsServiceConfigurer`, `WebAuthnConfigurer`, `X509Configurer`

public interface SecurityConfigurer<O,B extends SecurityBuilder<O>>
Allows for configuring a `SecurityBuilder`. All `SecurityConfigurer` first have their `init(SecurityBuilder)` method invoked. After all `init(SecurityBuilder)` methods have been invoked, each `configure(SecurityBuilder)` method is invoked.

See Also:
  - `AbstractConfiguredSecurityBuilder`

## Method Summary

Modifier and Type
Method
Description
`void`
`configure(B builder)`
Configure the `SecurityBuilder` by setting the necessary properties on the `SecurityBuilder`.
`void`
`init(B builder)`
Initialize the `SecurityBuilder`.

## Method Details

### init

void init(B builder) throws Exception
Initialize the `SecurityBuilder`. Here only shared state should be created and modified, but not properties on the `SecurityBuilder` used for building the object. This ensures that the `configure(SecurityBuilder)` method uses the correct shared objects when building. Configurers should be applied here.

Parameters:
  `builder` -
Throws:
  `Exception`

### configure

void configure(B builder) throws Exception
Configure the `SecurityBuilder` by setting the necessary properties on the `SecurityBuilder`.

Parameters:
  `builder` -
Throws:
  `Exception`