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
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- lazy val asJava: mvc.Http.Cookie
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- val domain: Option[String]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- val httpOnly: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val maxAge: Option[Int]
- val name: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- val path: String
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val sameSite: Option[SameSite]
- val secure: Boolean
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val value: String
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)