Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRedisSessionStore ¶
func NewRedisSessionStore(opts *options.SessionOptions, cookieOpts *options.CookieOptions) (sessions.SessionStore, error)
NewRedisSessionStore initialises a new instance of the SessionStore from the configuration given
Types ¶
type SessionStore ¶
type SessionStore struct { CookieCipher *encryption.Cipher CookieOptions *options.CookieOptions Client *redis.Client }
SessionStore is an implementation of the sessions.SessionStore interface that stores sessions in redis
func (*SessionStore) Clear ¶
func (store *SessionStore) Clear(rw http.ResponseWriter, req *http.Request) error
Clear clears any saved session information for a given ticket cookie from redis, and then clears the session
func (*SessionStore) Load ¶
func (store *SessionStore) Load(req *http.Request) (*sessions.SessionState, error)
Load reads sessions.SessionState information from a ticket cookie within the HTTP request object
func (*SessionStore) Save ¶
func (store *SessionStore) Save(rw http.ResponseWriter, req *http.Request, s *sessions.SessionState) error
Save takes a sessions.SessionState and stores the information from it to redies, and adds a new ticket cookie on the HTTP response writer
type TicketData ¶
TicketData is a structure representing the ticket used in server session storage
Click to show internal directories.
Click to hide internal directories.