mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 09:12:14 +00:00
Polish Kotlin snippet
- to match the comments in the related Java snippet Issue gh-11959
This commit is contained in:
parent
7804e3283b
commit
01117b11fe
@ -186,7 +186,9 @@ open fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChai
|
|||||||
fun csrfCookieWebFilter(): WebFilter {
|
fun csrfCookieWebFilter(): WebFilter {
|
||||||
return WebFilter { exchange, chain ->
|
return WebFilter { exchange, chain ->
|
||||||
val csrfToken = exchange.getAttribute<Mono<CsrfToken>>(CsrfToken::class.java.name) ?: Mono.empty()
|
val csrfToken = exchange.getAttribute<Mono<CsrfToken>>(CsrfToken::class.java.name) ?: Mono.empty()
|
||||||
csrfToken.doOnSuccess { }.then(chain.filter(exchange))
|
csrfToken.doOnSuccess {
|
||||||
|
/* Ensures the token is subscribed to. */
|
||||||
|
}.then(chain.filter(exchange))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
Loading…
x
Reference in New Issue
Block a user