invoke
operator fun ServerHttpSecurity.invoke(httpConfiguration: ServerHttpSecurityDsl.() -> Unit): SecurityWebFilterChain
Configures ServerHttpSecurity using a ServerHttpSecurity Kotlin DSL.
Example:
@Configuration
@EnableWebFluxSecurity
class SecurityConfig {
@Bean
fun springWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
return http {
authorizeExchange {
authorize("/public", permitAll)
authorize(anyExchange, authenticated)
}
}
}
}Content copied to clipboard
Author
Eleftheria Stein
Since
5.4
Parameters
httpConfiguration
the configurations to apply to ServerHttpSecurity