LogoutDsl

class LogoutDsl

A Kotlin DSL to configure HttpSecurity logout support using idiomatic Kotlin code.

Author

Eleftheria Stein

Since

5.3

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

whether the SecurityContextLogoutHandler should clear the Authentication at the time of logout.

Link copied to clipboard

whether to invalidate the HttpSession at the time of logout.

Link copied to clipboard
var logoutRequestMatcher: RequestMatcher?

the RequestMatcher that triggers log out to occur.

Link copied to clipboard
var logoutSuccessHandler: LogoutSuccessHandler?

the LogoutSuccessHandler to use after logout has occurred. If this is specified, logoutSuccessUrl is ignored.

Link copied to clipboard

the URL to redirect to after logout has occurred.

Link copied to clipboard

the URL that triggers log out to occur.

Link copied to clipboard

Functions

Link copied to clipboard
fun addLogoutHandler(logoutHandler: LogoutHandler)

Adds a LogoutHandler. The SecurityContextLogoutHandler is added as the last LogoutHandler by default.

Link copied to clipboard
fun defaultLogoutSuccessHandlerFor(logoutHandler: LogoutSuccessHandler, preferredMatcher: RequestMatcher)

Sets a default LogoutSuccessHandler to be used which prefers being invoked for the provided RequestMatcher.

Link copied to clipboard
fun deleteCookies(vararg cookieNamesToClear: String)

Allows specifying the names of cookies to be removed on logout success.

Link copied to clipboard
fun disable()

Disables logout

Link copied to clipboard
fun permitAll()

Grants access to the logoutSuccessUrl and the logoutUrl for every user.