Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request interface {
AuthenticateRequest(req *http.Request) (user.Info, bool, error)
}
Request attempts to extract authentication information from a request and returns information about the current user and true if successful, false if not successful, or an error if the token could not be checked.
type RequestFunc ¶
type RequestFunc func(req *http.Request) (user.Info, bool, error)
RequestFunc is a function that implements the Request interface.
func (RequestFunc) AuthenticateRequest ¶
func (f RequestFunc) AuthenticateRequest(req *http.Request) (user.Info, bool, error)
AuthenticateRequest implements authenticator.Request.
type Token ¶
type Token interface {
AuthenticateToken(token string) (user.Info, bool, error)
}
Token checks a string value against a backing authentication store and returns information about the current user and true if successful, false if not successful, or an error if the token could not be checked.
type TokenFunc ¶
type TokenFunc func(token string) (user.Info, bool, error)
TokenFunc is a function that implements the Token interface.
func (TokenFunc) AuthenticateToken ¶
func (f TokenFunc) AuthenticateToken(token string) (user.Info, bool, error)
AuthenticateToken implements authenticator.Token.