ServerCsrfDsl

A Kotlin DSL to configure ServerHttpSecurity CSRF protection using idiomatic Kotlin code.

Author

Eleftheria Stein

Since

5.4

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var accessDeniedHandler: ServerAccessDeniedHandler?

the ServerAccessDeniedHandler used when a CSRF token is invalid.

Link copied to clipboard
var csrfTokenRepository: ServerCsrfTokenRepository?

the ServerCsrfTokenRepository used to persist the CSRF token.

Link copied to clipboard
var csrfTokenRequestHandler: ServerCsrfTokenRequestHandler?

the ServerCsrfTokenRequestHandler that is used to make the CSRF token available as an exchange attribute

Link copied to clipboard
var requireCsrfProtectionMatcher: ServerWebExchangeMatcher?

the ServerWebExchangeMatcher used to determine when CSRF protection is enabled.

Functions

Link copied to clipboard
fun disable()

Disables CSRF protection