Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Session = NewBrowserSession()
Session is a global variable that holds the current session
Functions ¶
func AuthHandler ¶
func AuthHandler(w http.ResponseWriter, r *http.Request)
AuthHandler handle validating tokens and session cookies for local authentication
func ValidateSessionCookie ¶
func ValidateSessionCookie(w http.ResponseWriter, r *http.Request) bool
Types ¶
type BrowserSession ¶
type BrowserSession struct {
// contains filtered or unexported fields
}
BrowserSession is a struct that holds the session ID of the current session The session ID is generated once tokens are validated during local auth mode and is stored in a cookie
func NewBrowserSession ¶
func NewBrowserSession() *BrowserSession
NewBrowserSession creates a new BrowserSession
func (*BrowserSession) Remove ¶
func (s *BrowserSession) Remove()
func (*BrowserSession) Store ¶
func (s *BrowserSession) Store(sessionID string)
func (*BrowserSession) Validate ¶
func (s *BrowserSession) Validate(sessionID string) bool
Click to show internal directories.
Click to hide internal directories.