Documentation ¶
Index ¶
- type MySessionStore
- func (m *MySessionStore) CreateSession(userID int) (uuid.UUID, error)
- func (MySessionStore) DeleteSessionValues(ses *SessionState, whitelist []string)
- func (m *MySessionStore) DestroySession(w http.ResponseWriter, r *http.Request) error
- func (m *MySessionStore) InvalidateSession(sessionID uuid.UUID) error
- func (m *MySessionStore) IsAuthenticated(w http.ResponseWriter, r *http.Request) bool
- func (m *MySessionStore) Load(w http.ResponseWriter, r *http.Request, key string) (string, error)
- func (m *MySessionStore) ReadState(r *http.Request) (authboss.ClientState, error)
- func (m *MySessionStore) Save(w http.ResponseWriter, r *http.Request, key, value string) error
- func (m *MySessionStore) SaveObject(w http.ResponseWriter, r *http.Request, key string, value interface{}) error
- func (s MySessionStore) WriteState(w http.ResponseWriter, state authboss.ClientState, ...) error
- type SessionState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySessionStore ¶
type MySessionStore struct {
// contains filtered or unexported fields
}
MySessionStore is a custom session store that implements the authboss.SessionState interface.
func NewMySessionStore ¶
func NewMySessionStore() *MySessionStore
NewMySessionStore creates a new instance of MySessionStore.
func (*MySessionStore) CreateSession ¶
func (m *MySessionStore) CreateSession(userID int) (uuid.UUID, error)
func (MySessionStore) DeleteSessionValues ¶
func (MySessionStore) DeleteSessionValues(ses *SessionState, whitelist []string)
func (*MySessionStore) DestroySession ¶
func (m *MySessionStore) DestroySession(w http.ResponseWriter, r *http.Request) error
func (*MySessionStore) InvalidateSession ¶
func (m *MySessionStore) InvalidateSession(sessionID uuid.UUID) error
func (*MySessionStore) IsAuthenticated ¶
func (m *MySessionStore) IsAuthenticated(w http.ResponseWriter, r *http.Request) bool
func (*MySessionStore) Load ¶
func (m *MySessionStore) Load(w http.ResponseWriter, r *http.Request, key string) (string, error)
func (*MySessionStore) ReadState ¶
func (m *MySessionStore) ReadState(r *http.Request) (authboss.ClientState, error)
ReadState implements authboss.ClientStateReadWriter.
func (*MySessionStore) Save ¶
func (m *MySessionStore) Save(w http.ResponseWriter, r *http.Request, key, value string) error
Save saves the session data for a given session token.
func (*MySessionStore) SaveObject ¶
func (m *MySessionStore) SaveObject(w http.ResponseWriter, r *http.Request, key string, value interface{}) error
func (MySessionStore) WriteState ¶
func (s MySessionStore) WriteState(w http.ResponseWriter, state authboss.ClientState, ev []authboss.ClientStateEvent) error
type SessionState ¶
type SessionState struct {
// contains filtered or unexported fields
}
SessionState is an authboss.ClientState implementation that holds the request's session values for the duration of the request.
Click to show internal directories.
Click to hide internal directories.