authorizeExchange
Allows restricting access based upon the ServerWebExchange
Example:
@Configuration
@EnableWebFluxSecurity
class SecurityConfig {
@Bean
fun springWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
return http {
authorizeExchange {
authorize("/public", permitAll)
authorize(anyExchange, authenticated)
}
}
}
}Content copied to clipboard
Parameters
authorizeExchangeConfiguration
custom configuration that specifies access for an exchange