spring-framework / org.springframework.web.server.session / CookieWebSessionIdResolver

CookieWebSessionIdResolver

open class CookieWebSessionIdResolver : WebSessionIdResolver

Cookie-based WebSessionIdResolver.

Author
Rossen Stoyanchev

Since
5.0

Constructors

<init>

CookieWebSessionIdResolver()

Cookie-based WebSessionIdResolver.

Functions

expireSession

open fun expireSession(exchange: ServerWebExchange): Unit

getCookieMaxAge

open fun getCookieMaxAge(): Duration

Return the configured "Max-Age" attribute value for the session cookie.

getCookieName

open fun getCookieName(): String

Return the configured cookie name.

resolveSessionIds

open fun resolveSessionIds(exchange: ServerWebExchange): MutableList<String>

setCookieMaxAge

open fun setCookieMaxAge(maxAge: Duration): Unit

Set the value for the "Max-Age" attribute of the cookie that holds the session id. For the range of values see ResponseCookie#getMaxAge().

By default set to -1.

setCookieName

open fun setCookieName(cookieName: String): Unit

Set the name of the cookie to use for the session id.

By default set to "SESSION".

setSessionId

open fun setSessionId(exchange: ServerWebExchange, id: String): Unit