Documentation
¶
Index ¶
- type CookieSession
- type CookieStore
- func (s *CookieStore) Create(id string) (auth.Session, error)
- func (s *CookieStore) Destroy(id string) error
- func (s *CookieStore) GarbageCollect(maxLifetime time.Duration) error
- func (s *CookieStore) Get(r *http.Request, id string) (auth.Session, error)
- func (s *CookieStore) Save(w http.ResponseWriter, session auth.Session) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CookieSession ¶
type CookieSession struct {
*auth.BaseSession
// contains filtered or unexported fields
}
CookieSession wraps BaseSession for cookie storage
func (*CookieSession) Save ¶
func (s *CookieSession) Save(w http.ResponseWriter) error
Save saves session to cookie
type CookieStore ¶
type CookieStore struct {
// contains filtered or unexported fields
}
CookieStore implements SessionStore using encrypted cookies
func NewCookieStore ¶
func NewCookieStore(config auth.SessionConfig) (*CookieStore, error)
NewCookieStore creates a new cookie session store
func (*CookieStore) Create ¶
func (s *CookieStore) Create(id string) (auth.Session, error)
Create creates a new session
func (*CookieStore) Destroy ¶
func (s *CookieStore) Destroy(id string) error
Destroy destroys session
func (*CookieStore) GarbageCollect ¶
func (s *CookieStore) GarbageCollect(maxLifetime time.Duration) error
GarbageCollect performs garbage collection (not needed for cookies)
func (*CookieStore) Save ¶
func (s *CookieStore) Save(w http.ResponseWriter, session auth.Session) error
Save saves session to cookie
Click to show internal directories.
Click to hide internal directories.