Versions in this module Expand all Collapse all v0 v0.1.0 Feb 3, 2018 Changes in this version + type AuthPlzCtx struct + Global *AuthPlzGlobalCtx + func (c *AuthPlzCtx) Bind2FARequest(rw web.ResponseWriter, req *web.Request, userID string, action string) + func (c *AuthPlzCtx) BindInst(rw web.ResponseWriter, req *web.Request, sessionKey, dataKey string, ...) error + func (c *AuthPlzCtx) BindRecoveryRequest(userID string, rw web.ResponseWriter, req *web.Request) + func (c *AuthPlzCtx) BindRedirect(url string, rw web.ResponseWriter, req *web.Request) + func (c *AuthPlzCtx) CanSudo(rw web.ResponseWriter, req *web.Request) bool + func (c *AuthPlzCtx) ClearSudo(rw web.ResponseWriter, req *web.Request) + func (c *AuthPlzCtx) DoRedirect(url string, rw web.ResponseWriter, req *web.Request) + func (c *AuthPlzCtx) Get2FARequest(rw web.ResponseWriter, req *web.Request) (string, string) + func (c *AuthPlzCtx) GetFlashMessage(rw web.ResponseWriter, req *web.Request) string + func (c *AuthPlzCtx) GetIPMiddleware(rw web.ResponseWriter, req *web.Request, next web.NextMiddlewareFunc) + func (c *AuthPlzCtx) GetInst(rw web.ResponseWriter, req *web.Request, sessionKey, dataKey string) (interface{}, error) + func (c *AuthPlzCtx) GetMeta() map[string]string + func (c *AuthPlzCtx) GetNamedSession(rw web.ResponseWriter, req *web.Request, sessionKey string) (*sessions.Session, error) + func (c *AuthPlzCtx) GetRecoveryRequest(rw web.ResponseWriter, req *web.Request) string + func (c *AuthPlzCtx) GetRedirect(rw web.ResponseWriter, req *web.Request) string + func (c *AuthPlzCtx) GetSession() *sessions.Session + func (c *AuthPlzCtx) GetUserID() string + func (c *AuthPlzCtx) LoginUser(userid string, rw web.ResponseWriter, req *web.Request) + func (c *AuthPlzCtx) LogoutUser(rw web.ResponseWriter, req *web.Request) + func (c *AuthPlzCtx) RequireAccountMiddleware(rw web.ResponseWriter, req *web.Request, next web.NextMiddlewareFunc) + func (c *AuthPlzCtx) SessionMiddleware(rw web.ResponseWriter, req *web.Request, next web.NextMiddlewareFunc) + func (c *AuthPlzCtx) SetFlashMessage(message string, rw web.ResponseWriter, req *web.Request) + func (c *AuthPlzCtx) SetSudo(userID string, timeout time.Duration, rw web.ResponseWriter, req *web.Request) + func (c *AuthPlzCtx) UserAction(userid, action string, rw web.ResponseWriter, req *web.Request) + func (c *AuthPlzCtx) WriteAPIResult(w http.ResponseWriter, code string) + func (c *AuthPlzCtx) WriteAPIResultWithCode(w http.ResponseWriter, status int, code string) + func (c *AuthPlzCtx) WriteInternalError(w http.ResponseWriter) + func (c *AuthPlzCtx) WriteJSON(w http.ResponseWriter, i interface{}) + func (c *AuthPlzCtx) WriteJSONWithStatus(w http.ResponseWriter, status int, i interface{}) + func (c *AuthPlzCtx) WriteUnauthorized(w http.ResponseWriter) + type AuthPlzGlobalCtx struct + SessionStore *sessions.CookieStore + func NewGlobalCtx(sessionStore *sessions.CookieStore) AuthPlzGlobalCtx + type MiddlewareFunc func(c *AuthPlzCtx, rw web.ResponseWriter, req *web.Request, ...) + func BindContext(globalCtx *AuthPlzGlobalCtx) MiddlewareFunc + type SecondFactorRequest struct + Action string + UserID string + type SudoSession struct + SessionEnd time.Time + SessionStart time.Time + UserID string + type User interface + GetExtID func() string + IsAdmin func() string