Taxum / @taxum/cookie / SignedJar
Class: SignedJar
Defined in: signed.ts:16
A child cookie jar that authenticates its cookies.
A signed child jar signs all the cookies added to it and verifies cookies retrieved from it. Any cookies stored in the SignedJar
are provided integrity and authenticity. In other words, clients cannot tamper with the contents of a cookie, nor can they fabricate cookie values, but the data is visible in plaintext.
Methods
add()
add(
cookie
):void
Defined in: signed.ts:49
Adds a Cookie to the parent jar.
The cookie's value is signed assuring integrity and authenticity.
Parameters
cookie
Returns
void
See
get()
get(
name
):null
|Cookie
Defined in: signed.ts:37
Returns a Cookie with the name name
from the parent jar.
It verifies the authenticity and integrity of the cookie's value, returning a Cookie
with the authenticated value. If the cookie cannot be found, or the cookie fails to verify, null
is returned.
Parameters
name
string
Returns
null
| Cookie
See
remove()
remove(
cookie
):void
Defined in: signed.ts:61
Removes a Cookie from the parent jar.
For correct removal, the passed in cookie
must contain the same path
and domain
as the cookie that was initially set.
Parameters
cookie
Returns
void