Documentation ¶
Index ¶
Constants ¶
View Source
const AuthNop = "None"
AuthNop is the identifier returned by Nop.Identifier
View Source
const AuthUserpass = "Userpass"
AuthUserpass is the identifier returned by Nop.Userpass
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
type Authorizer interface { LoginHandler() http.HandlerFunc TokenHandler() TokenFunc Identifier() AuthType }
func NewAuth ¶
func NewAuth(conf Config) (Authorizer, error)
type Nop ¶
type Nop struct{}
func (Nop) Identifier ¶
func (Nop) LoginHandler ¶
func (_ Nop) LoginHandler() http.HandlerFunc
func (Nop) TokenHandler ¶
type TokenFunc ¶
type TokenFunc func(http.HandlerFunc) http.HandlerFunc
type Userpass ¶
type Userpass struct {
// contains filtered or unexported fields
}
func NewUserpass ¶
func NewUserpass(conf UserpassConfig) (*Userpass, error)
func (*Userpass) Identifier ¶
func (*Userpass) LoginHandler ¶
func (u *Userpass) LoginHandler() http.HandlerFunc
func (*Userpass) TokenHandler ¶
Click to show internal directories.
Click to hide internal directories.