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

# Class ServletApiConfigurer<H extends HttpSecurityBuilder<H>>

java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,B>
org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<ServletApiConfigurer<H>,H>
org.springframework.security.config.annotation.web.configurers.ServletApiConfigurer<H>

All Implemented Interfaces:
  `SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H>`

public final class ServletApiConfigurer<H extends HttpSecurityBuilder<H>> extends AbstractHttpConfigurer<ServletApiConfigurer<H>,H>
Implements select methods from the `HttpServletRequest` using the `SecurityContext` from the `SecurityContextHolder`.

## Security Filters

The following Filters are populated

- `SecurityContextHolderAwareRequestFilter`

## Shared Objects Created

No shared objects are created.

## Shared Objects Used

- `AuthenticationTrustResolver` is optionally used to populate the `SecurityContextHolderAwareRequestFilter`

Since:
  3.2

## Constructor Summary

Constructors
Constructor
Description
`ServletApiConfigurer()`
Creates a new instance

## Method Summary

Modifier and Type
Method
Description
`void`
`configure(H http)`
Configure the `SecurityBuilder` by setting the necessary properties on the `SecurityBuilder`.
`ServletApiConfigurer<H>`
`rolePrefix(String rolePrefix)`

### Methods inherited from class org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer

`disable, getSecurityContextHolderStrategy, withObjectPostProcessor, withObjectPostProcessor`

### Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter

`addObjectPostProcessor, addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilder`

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

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

## Constructor Details

### ServletApiConfigurer

public ServletApiConfigurer()
Creates a new instance

See Also:
  - `HttpSecurity.servletApi()`

## Method Details

### rolePrefix

public ServletApiConfigurer<H> rolePrefix(String rolePrefix)

### configure

public void configure(H http)
Description copied from interface: `SecurityConfigurer`
Configure the `SecurityBuilder` by setting the necessary properties on the `SecurityBuilder`.

Specified by:
  `configure` in interface `SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>`
Overrides:
  `configure` in class `SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>`