Skip to content
Playground(another site)

bynk.actor.signed_cookie_write_literal

Error An untyped Cookie literal is named like a SignedCookie actor's session cookie.

A Cookie { name: "__Host-session", … } literal named like a SignedCookie actor's session cookie would write or clear the credential by hand, without the actor's signing key, expiry or CSRF seam, so it is refused. Write it with Actor.issue(identity) and remove it with Actor.expire().

Example

Ok("x").withCookie(Cookie { name: "__Host-session", value: "forged" }) // ✗ the actor's cookie
Ok("x").withCookie(Cookie { name: "theme", value: "dark" }) // ✓ another cookie

In the Book

See also

  • Every code in its category, Actors, on the diagnostic index.
  • bynk explain bynk.actor.signed_cookie_write_literal shows the same from the installed toolchain, without a network.