Cookie

play.api.mvc.Cookie
See theCookie companion object
case class Cookie(name: String, value: String, maxAge: Option[Int], path: String, domain: Option[String], secure: Boolean, httpOnly: Boolean, sameSite: Option[SameSite], partitioned: Boolean)

An HTTP cookie.

Value parameters

domain

the cookie domain

httpOnly

whether this cookie is HTTP only, i.e. not accessible from client-side JavaScript code

maxAge

the cookie expiration date in seconds, None for a transient cookie, or a value 0 or less to expire a cookie now

name

the cookie name

partitioned

whether the Partitioned attribute of the cookie should be set (true) or not (false) to support CHIPS (Cookies Having Independent Partitioned State)

path

the cookie path, defaulting to the root path /

sameSite

defines cookie access restriction: first-party or same-site context

secure

whether this cookie is secured, sent only for HTTPS requests

value

the cookie value

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields

lazy val asJava: Cookie