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

# Class ServerHttpSecurity.RequestCacheSpec

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

Enclosing class:
  ServerHttpSecurity

public final class ServerHttpSecurity.RequestCacheSpec extends Object
Configures the request cache which is used when a flow is interrupted (i.e. due to requesting credentials) so that the request can be replayed after authentication.

Since:
  5.0
See Also:
  - `ServerHttpSecurity.requestCache()`

## 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.
`protected void`
`configure(ServerHttpSecurity http)`
`ServerHttpSecurity`
`disable()`
Disables the `ServerHttpSecurity.RequestCacheSpec`
`ServerHttpSecurity.RequestCacheSpec`
`requestCache(org.springframework.security.web.server.savedrequest.ServerRequestCache requestCache)`
Configures the cache used

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

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

## Method Details

### requestCache

public ServerHttpSecurity.RequestCacheSpec requestCache(org.springframework.security.web.server.savedrequest.ServerRequestCache requestCache)
Configures the cache used

Parameters:
  `requestCache` - the request cache
Returns:
  the `ServerHttpSecurity.RequestCacheSpec` to configure

### configure

protected void configure(ServerHttpSecurity http)

### 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.requestCache(Customizer)` or `requestCache(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

### disable

public ServerHttpSecurity disable()
Disables the `ServerHttpSecurity.RequestCacheSpec`

Returns:
  the `ServerHttpSecurity` to continue configuring