Documentation ¶
Overview ¶
Package sessionstore provides a session store for persistence of HTTP session data. The session store is compatible with Gorilla sessions (github.com/gorilla/sessions).
The session store also persists randomly generated secret keying material that is used for generating the keys used to sign and encrypt the secure session cookies. The secret keying material is regularly rotated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { DB storage.Provider Options sessions.Options AppID string // set if multiple apps share the same storage provider Codec *codec.Codec }
Store implements the Gorilla Sessions sessions.Store interface for persistence of HTTP session data.
The Store automatically generates and persists random secret keying material that is used for generating the keys used to sign and encrypt the secure session cookies. The secret keying material is regularly rotated.
While all fields are public, they should not be modified once the store is in use.
func New ¶
New creates a new store suitable for persisting sessions. Session data is persisted using db and options provides information about the session cookies. If multiple web applications use the same provider (eg the same database table), then each web application should use a different appid so that they generate and rotate their own, independent secret keying material.