CookieConfiguration

A configuration used to specify cookie attributes for Sessions.

Constructors

Link copied to clipboard

Properties

Link copied to clipboard
var domain: String? = null

Specifies the host to which the cookie is sent.

Link copied to clipboard

Specifies a cookie encoding.

Link copied to clipboard

Allows you to add custom cookie attributes, which are not exposed explicitly. For example, you can pass the SameSite attribute in the following way:

Link copied to clipboard
var httpOnly: Boolean = true

Specifies whether cookie access is forbidden from JavaScript.

Link copied to clipboard

Specifies the number of seconds until the cookie expires.

Link copied to clipboard
var path: String?

Cookie path

Link copied to clipboard
var secure: Boolean = false

Enables transferring cookies via a secure connection only and protects session data from HTTPS downgrade attacks.

Extensions

Link copied to clipboard

Cookie time to live duration or null for session cookies. Session cookies are client-driven. For example, a web browser usually removes session cookies at browser or window close unless the session is restored.