Packages

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
Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Cookie
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

Value Members

  1. lazy val asJava: mvc.Http.Cookie
  2. val domain: Option[String]
  3. val httpOnly: Boolean
  4. val maxAge: Option[Int]
  5. val name: String
  6. val path: String
  7. def productElementNames: Iterator[String]
    Definition Classes
    Product
  8. val sameSite: Option[SameSite]
  9. val secure: Boolean
  10. val value: String