Cookie Session Transport
The cookie transport stores session identifiers in cookies on the request andresponse object.
Examples
cookieTransport([options]): Transport
Creates a Transport that can be used in the sessions middleware.
- options:
Object
(optional)
An object with the following properties:
The name of the cookie.
- ttl:
number
(optional)
Cookie lifetime in seconds. Note that this does not affect the storage TTL(i.e. how long the session itself is considered valid), just how long thecookie should be stored by the client.
- algorithm:
string
(optional)
The algorithm used to sign and verify the cookie. If no algorithm isspecified, the cookie will not be signed or verified.See the .
- path: (optional)
Path for which the cookie should be issued.
- domain:
string
(optional)
Domain for which the cookie should be issued.
Whether the cookie should be marked as secure (i.e. HTTPS/SSL-only).
- httpOnly: (Default:
false
)
Whether the cookie should be marked as HTTP-only (rather than alsoexposing it to client-side code).