case class Cookie(name: String, value: String, maxAge: Option[Int] = None, path: String = "/", domain: Option[String] = None, secure: Boolean = false, httpOnly: Boolean = true, sameSite: Option[SameSite] = None) extends Product with Serializable
An HTTP cookie.
- name
the cookie name
- value
the cookie value
- maxAge
the cookie expiration date in seconds,
None
for a transient cookie, or a value 0 or less to expire a cookie now- path
the cookie path, defaulting to the root path
/
- domain
the cookie domain
- secure
whether this cookie is secured, sent only for HTTPS requests
- httpOnly
whether this cookie is HTTP only, i.e. not accessible from client-side JavaScript code
- sameSite
defines cookie access restriction: first-party or same-site context
- Source
- Cookie.scala
- Alphabetic
- By Inheritance
- Cookie
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Cookie(name: String, value: String, maxAge: Option[Int] = None, path: String = "/", domain: Option[String] = None, secure: Boolean = false, httpOnly: Boolean = true, sameSite: Option[SameSite] = None)
- name
the cookie name
- value
the cookie value
- maxAge
the cookie expiration date in seconds,
None
for a transient cookie, or a value 0 or less to expire a cookie now- path
the cookie path, defaulting to the root path
/
- domain
the cookie domain
- secure
whether this cookie is secured, sent only for HTTPS requests
- httpOnly
whether this cookie is HTTP only, i.e. not accessible from client-side JavaScript code
- sameSite
defines cookie access restriction: first-party or same-site context