requestCache

fun requestCache(requestCacheConfiguration: ServerRequestCacheDsl.() -> Unit)

Allows configuring 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.

Example:

@Configuration
@EnableWebFluxSecurity
class SecurityConfig {

@Bean
fun springWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
return http {
requestCache { }
}
}
}

Parameters

requestCacheConfiguration

custom configuration to apply to the request cache

See also