Documentation ¶
Index ¶
Constants ¶
View Source
const ( LoginPageURL = "/login" LogoutPageURL = "/logout" )
Variables ¶
View Source
var ErrMissingUserID = errors.New("missing user id in session data")
Functions ¶
Types ¶
type AuthenticateHandler ¶
type AuthenticateHandler struct {
// contains filtered or unexported fields
}
func NewAuthenticateHandler ¶
func NewAuthenticateHandler(log *log.Logger, settingsRepo settingsRepository, sessionRepo sessionRepository) *AuthenticateHandler
func (*AuthenticateHandler) Edit ¶
func (a *AuthenticateHandler) Edit(rw http.ResponseWriter, req *http.Request)
func (*AuthenticateHandler) Login ¶
func (a *AuthenticateHandler) Login(rw http.ResponseWriter, req *http.Request)
func (*AuthenticateHandler) Logout ¶
func (a *AuthenticateHandler) Logout(rw http.ResponseWriter, req *http.Request)
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
func NewAuthenticateMiddleware ¶
func NewAuthenticateMiddleware(log *log.Logger, settingsRepo settingsRepository, sessionRepo sessionRepository) *Middleware
func (*Middleware) LoginRequiredMiddleware ¶
func (m *Middleware) LoginRequiredMiddleware(f http.HandlerFunc) http.HandlerFunc
Click to show internal directories.
Click to hide internal directories.