Documentation ¶
Index ¶
- Variables
- type Flashes
- type Manager
- type Provider
- type SessionManager
- func (s *SessionManager) ApiAuth(next http.Handler) http.Handler
- func (s *SessionManager) DoLogin(w http.ResponseWriter, r *http.Request, token string) error
- func (s *SessionManager) DoLogout(w http.ResponseWriter, r *http.Request) error
- func (s *SessionManager) OverrideApiAuth(provider Provider) func(next http.Handler) http.Handler
- func (s *SessionManager) OverridePagAuth(provider Provider) func(next http.Handler) http.Handler
- func (s *SessionManager) PageAuth(next http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthFailed = errors.New("Auth failed")
View Source
var TokenUnrecognized = errors.New("Token Unrecognized")
Functions ¶
This section is empty.
Types ¶
type Flashes ¶
type Flashes interface { SetErrorFlash(w http.ResponseWriter, r *http.Request, message string) SetSuccessFlash(w http.ResponseWriter, r *http.Request, message string) }
type Manager ¶
type Manager interface { DoLogin(w http.ResponseWriter, r *http.Request, token string) error DoLogout(w http.ResponseWriter, r *http.Request) error PageAuth(next http.Handler) http.Handler OverridePagAuth(provider Provider) func(next http.Handler) http.Handler ApiAuth(next http.Handler) http.Handler OverrideApiAuth(provider Provider) func(next http.Handler) http.Handler }
func NewSessionManager ¶
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
func (*SessionManager) DoLogin ¶
func (s *SessionManager) DoLogin(w http.ResponseWriter, r *http.Request, token string) error
func (*SessionManager) DoLogout ¶
func (s *SessionManager) DoLogout(w http.ResponseWriter, r *http.Request) error
func (*SessionManager) OverrideApiAuth ¶
func (*SessionManager) OverridePagAuth ¶
Click to show internal directories.
Click to hide internal directories.