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 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.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.