Documentation ¶
Index ¶
Constants ¶
View Source
const ( ModeProd = "prod" ModeDev = "dev" )
View Source
const Version = "v0.3.0"
Variables ¶
This section is empty.
Functions ¶
func IsDevelopMode ¶
func IsDevelopMode() bool
Types ¶
type Authenticator ¶
func NewAuthenticator ¶
func NewAuthenticator(ctx context.Context) (*Authenticator, error)
type Handler ¶
func NewHandler ¶
type MultiError ¶
type MultiError []error
func (*MultiError) Add ¶
func (me *MultiError) Add(err error)
func (*MultiError) Error ¶
func (me *MultiError) Error() string
type SessionAuthenticator ¶
type SessionAuthenticator struct {
// contains filtered or unexported fields
}
func NewSessionAuthenticator ¶
func NewSessionAuthenticator(sessionManager *scs.SessionManager) *SessionAuthenticator
func (*SessionAuthenticator) Authenticate ¶
func (a *SessionAuthenticator) Authenticate(r *http.Request, w http.ResponseWriter) (auth.Identity, error)
Authenticates the current user.
func (*SessionAuthenticator) Challenge ¶
func (a *SessionAuthenticator) Challenge(*http.Request, http.ResponseWriter)
Challenge generates challenges upon authentication failure.
Click to show internal directories.
Click to hide internal directories.