Documentation ¶
Index ¶
- func NewCookieSessionStore(opts *options.SessionOptions, cookieOpts *options.Cookie) (sessions.SessionStore, error)
- type SessionStore
- func (s *SessionStore) Clear(rw http.ResponseWriter, req *http.Request) error
- func (s *SessionStore) Load(req *http.Request) (*sessions.SessionState, error)
- func (s *SessionStore) Save(rw http.ResponseWriter, req *http.Request, ss *sessions.SessionState) error
- func (s *SessionStore) VerifyConnection(_ context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCookieSessionStore ¶
func NewCookieSessionStore(opts *options.SessionOptions, cookieOpts *options.Cookie) (sessions.SessionStore, error)
NewCookieSessionStore initialises a new instance of the SessionStore from the configuration given
Types ¶
type SessionStore ¶
type SessionStore struct { Cookie *options.Cookie CookieCipher encryption.Cipher Minimal bool }
SessionStore is an implementation of the sessions.SessionStore interface that stores sessions in client side cookies
func (*SessionStore) Clear ¶
func (s *SessionStore) Clear(rw http.ResponseWriter, req *http.Request) error
Clear clears any saved session information by writing a cookie to clear the session
func (*SessionStore) Load ¶
func (s *SessionStore) Load(req *http.Request) (*sessions.SessionState, error)
Load reads sessions.SessionState information from Cookies within the HTTP request object
func (*SessionStore) Save ¶
func (s *SessionStore) Save(rw http.ResponseWriter, req *http.Request, ss *sessions.SessionState) error
Save takes a sessions.SessionState and stores the information from it within Cookies set on the HTTP response writer
func (*SessionStore) VerifyConnection ¶
func (s *SessionStore) VerifyConnection(_ context.Context) error
VerifyConnection always return no-error, as there's no connection in this store
Click to show internal directories.
Click to hide internal directories.