Cookie

final case class Cookie(name: String, content: String, expires: Option[Instant], domain: Option[String], path: Option[Path], isSecure: Boolean, isHttpOnly: Boolean, maxAge: Option[Long], sameSite: Option[SameSite], secret: Option[String])
Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

Creates a new cookie that can be used to clear the original cookie on the client.

Creates a new cookie that can be used to clear the original cookie on the client.

Converts cookie into a string

Converts cookie into a string

def sign(secret: String): Cookie

Signs the cookie at the time of encoding using the provided secret.

Signs the cookie at the time of encoding using the provided secret.

Removes secret in the cookie

Removes secret in the cookie

Sets content in cookie

Sets content in cookie

Sets domain in cookie

Sets domain in cookie

def withExpiry(v: Instant): Cookie

Sets expiry in cookie

Sets expiry in cookie

Sets httpOnly in cookie

Sets httpOnly in cookie

def withMaxAge(v: Duration): Cookie

Sets max-age in cookie

Sets max-age in cookie

Sets max-age in seconds in cookie

Sets max-age in seconds in cookie

Sets path in cookie

Sets path in cookie

Sets same-site in cookie

Sets same-site in cookie

Sets secure in cookie

Sets secure in cookie

Removes domain from the cookie

Removes domain from the cookie

Removes expiry from the cookie

Removes expiry from the cookie

Resets httpOnly flag in the cookie

Resets httpOnly flag in the cookie

Removes max-age from the cookie

Removes max-age from the cookie

Removes path from the cookie

Removes path from the cookie

Removes same-site from the cookie

Removes same-site from the cookie

Resets secure flag in the cookie

Resets secure flag in the cookie

Inherited methods

Inherited from:
Product