RotatingKeySessionCookieBaker

com.gu.play.secretrotation.RotatingSecretComponents.RotatingKeySessionCookieBaker
class RotatingKeySessionCookieBaker(val config: SessionConfiguration, val snapshotProvider: SnapshotProvider) extends SessionCookieBaker, RotatingSecretCookieCodec

Attributes

Graph
Supertypes
trait SessionCookieBaker
trait CookieDataCodec
trait CookieBaker[Session]
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]): Session

Decodes the data from a Cookie.

Decodes the data from a Cookie.

Attributes

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

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:
SessionCookieBaker
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
SessionCookieBaker -> CookieBaker
Inherited from:
SessionCookieBaker
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: Session): 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
SessionCookieBaker -> CookieBaker
Inherited from:
SessionCookieBaker
override 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

Definition Classes
SessionCookieBaker -> CookieBaker
Inherited from:
SessionCookieBaker
override def path: String

The cookie path.

The cookie path.

Attributes

Definition Classes
SessionCookieBaker -> CookieBaker
Inherited from:
SessionCookieBaker
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
SessionCookieBaker -> CookieBaker
Inherited from:
SessionCookieBaker
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
SessionCookieBaker -> CookieBaker
Inherited from:
SessionCookieBaker
def serialize(session: Session): 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:
SessionCookieBaker

Concrete fields

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

Inherited fields

lazy val emptyCookie: Session

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:
SessionCookieBaker
override val isSigned: Boolean

true if the Cookie is signed. Defaults to false.

true if the Cookie is signed. Defaults to false.

Attributes

Inherited from:
SessionCookieBaker

Implicits

Inherited implicits

implicit val c: Clock

Attributes

Inherited from:
RotatingSecretCookieCodec