RotatingKeyFlashCookieBaker

com.gu.play.secretrotation.RotatingSecretComponents.RotatingKeyFlashCookieBaker
class RotatingKeyFlashCookieBaker(val config: FlashConfiguration, val snapshotProvider: SnapshotProvider) extends FlashCookieBaker, RotatingSecretCookieCodec

Attributes

Graph
Supertypes
trait FlashCookieBaker
trait CookieDataCodec
trait CookieBaker[Flash]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

override def decode(data: String): Map[String, String]

Decodes from an encoded String.

Decodes from an encoded String.

Attributes

Definition Classes
RotatingSecretCookieCodec -> CookieDataCodec
Inherited from:
RotatingSecretCookieCodec
def decodeCookieToMap(cookie: Option[Cookie]): Map[String, String]

Decodes the data from a Cookie.

Decodes the data from a Cookie.

Attributes

Inherited from:
CookieBaker
def decodeFromCookie(cookie: Option[Cookie]): Flash

Decodes the data from a Cookie.

Decodes the data from a Cookie.

Attributes

Inherited from:
CookieBaker
def deserialize(data: Map[String, String]): Flash

Builds the cookie object from the given data map.

Builds the cookie object from the given data map.

Value parameters

data

the data map to build the cookie object

Attributes

Returns

a new cookie object

Inherited from:
FlashCookieBaker
def discard: DiscardingCookie

Attributes

Inherited from:
CookieBaker
override def domain: Option[String]

The cookie domain. Defaults to None.

The cookie domain. Defaults to None.

Attributes

Definition Classes
FlashCookieBaker -> CookieBaker
Inherited from:
FlashCookieBaker
override def encode(data: Map[String, String]): String

Encodes the data as a String.

Encodes the data as a String.

Attributes

Definition Classes
RotatingSecretCookieCodec -> CookieDataCodec
Inherited from:
RotatingSecretCookieCodec
def encodeAsCookie(data: Flash): Cookie

Encodes the data as a Cookie.

Encodes the data as a Cookie.

Attributes

Inherited from:
CookieBaker
override def httpOnly: Boolean

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

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

Attributes

Definition Classes
FlashCookieBaker -> CookieBaker
Inherited from:
FlashCookieBaker
def isSigned: Boolean

true if the Cookie is signed. Defaults to false.

true if the Cookie is signed. Defaults to false.

Attributes

Inherited from:
CookieBaker
def maxAge: Option[Int]

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

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

Attributes

Inherited from:
CookieBaker
override def path: String

The cookie path.

The cookie path.

Attributes

Definition Classes
FlashCookieBaker -> CookieBaker
Inherited from:
FlashCookieBaker
override def sameSite: Option[SameSite]

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

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

Attributes

Definition Classes
FlashCookieBaker -> CookieBaker
Inherited from:
FlashCookieBaker
override def secure: Boolean

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

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

Attributes

Definition Classes
FlashCookieBaker -> CookieBaker
Inherited from:
FlashCookieBaker
def serialize(flash: Flash): Map[String, String]

Converts the given cookie object into a data map.

Converts the given cookie object into a data map.

Value parameters

cookie

the cookie object to serialize into a map

Attributes

Returns

a new Map storing the key-value pairs for the given cookie

Inherited from:
FlashCookieBaker

Concrete fields

val config: FlashConfiguration
override val jwtConfiguration: JWTConfiguration
val snapshotProvider: SnapshotProvider

Inherited fields

lazy val emptyCookie: Flash

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

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

Attributes

Inherited from:
FlashCookieBaker

Implicits

Inherited implicits

implicit val c: Clock

Attributes

Inherited from:
RotatingSecretCookieCodec