Packages

t

play.api.mvc

CookieBaker

trait CookieBaker[T <: AnyRef] extends AnyRef

Trait that should be extended by the Cookie helpers.

Self Type
CookieBaker[T] with CookieDataCodec
Source
Cookie.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CookieBaker
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def COOKIE_NAME: String

    The cookie name.

  2. abstract def emptyCookie: T

    Default cookie, returned in case of error or if missing in the HTTP headers.

Concrete Value Members

  1. def decodeCookieToMap(cookie: Option[Cookie]): Map[String, String]

    Decodes the data from a Cookie.

  2. def decodeFromCookie(cookie: Option[Cookie]): T

    Decodes the data from a Cookie.

  3. def discard: DiscardingCookie
  4. def domain: Option[String]

    The cookie domain.

    The cookie domain. Defaults to None.

  5. def encodeAsCookie(data: T): Cookie

    Encodes the data as a Cookie.

  6. def httpOnly: Boolean

    true if the Cookie should have the httpOnly flag, disabling access from Javascript.

    true if the Cookie should have the httpOnly flag, disabling access from Javascript. Defaults to true.

  7. def isSigned: Boolean

    true if the Cookie is signed.

    true if the Cookie is signed. Defaults to false.

  8. def maxAge: Option[Int]

    The cookie expiration date in seconds, None for a transient cookie

  9. def path: String

    The cookie path.

  10. def sameSite: Option[SameSite]

    The value of the SameSite attribute of the cookie.

    The value of the SameSite attribute of the cookie. Defaults to no SameSite.

  11. def secure: Boolean

    true if the Cookie should have the secure flag, restricting usage to https.

    true if the Cookie should have the secure flag, restricting usage to https. Defaults to false.