sessionmanager

package
v0.0.0-...-5dd2f1f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 (*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

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.

func (SessionState) Get

func (s SessionState) Get(key string) (string, bool)

Get a key from the session

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL