Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadLogin = errors.New("Bad Login") ErrNotAuthorized = errors.New("Not Authorized") )
errors to be checked against returned
Functions ¶
This section is empty.
Types ¶
type Auther ¶
type Auther interface { // Check should return a non-nil error for failed requests (like ErrBadLogin) // and it can pass custom data that is saved in the cookie through the first return argument Check(user, pass string) (interface{}, error) }
Auther allows for custom authentication backends
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (Handler) AuthenticateRequest ¶
type Option ¶
Option is a function that changes a handler in a certain way during initialization
func SetLanding ¶
SetLanding sets the url to where a client is redirect to after login
func SetLifetime ¶
SetLifetime sets the duration of when a session expires after it is created
func SetLogout ¶
SetLogout sets the url to where a client is redirect to after logout uses Landing location by default
func SetSessionName ¶
SetSessionName sets the name to use for sessions (ie. cookie name)
Click to show internal directories.
Click to hide internal directories.