session

package
v0.0.0-...-fc272d6 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AuthCookieName = "lunchbunch_auth"
View Source
const AuthenticationStoreKey = "authenticated"
View Source
const SettingsCookieName = "lunchbunch_settings"

Variables

This section is empty.

Functions

func CreateSessionStore

func CreateSessionStore() (store *sessions.CookieStore, err error)

Types

type CookieStoreOperation

type CookieStoreOperation interface {
	LoginCookie(username string, req *http.Request, w http.ResponseWriter) (*Data, error)
	LogoutCookie(req *http.Request, w http.ResponseWriter) (*Data, error)
	IsAuthenticated(req *http.Request) (bool, error)
	UserData(req *http.Request) (*Data, error)
}

type Data

type Data struct {
	IsAuthenticated bool
	Username        string
	UserID          uint
}

type SessionHasNoData

type SessionHasNoData struct {
}

func (*SessionHasNoData) Error

func (e *SessionHasNoData) Error() string

Jump to

Keyboard shortcuts

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