Documentation ¶
Index ¶
- func AuthenticationFallbackHandler(handler http.Handler, authenticationFunc AuthenticationFunc, ...) http.Handler
- func AuthenticationHandler(handler http.Handler, authenticationFunc AuthenticationFunc) http.Handler
- func BasicAuthenticationHandler(handler http.Handler, realm string, userAuthenticator UserAuthenticator, ...) http.Handler
- func BearerAuthenticationHandler(handler http.Handler, tokenAuthenticator TokenAuthenticator, ...) http.Handler
- func TokenHeaderAuthenticationHandler(handler http.Handler, tokenAuthenticator TokenAuthenticator, ...) http.Handler
- type AuthenticationFunc
- func BasicAuthentication(realm string, userAuthenticator UserAuthenticator, contextKey interface{}) AuthenticationFunc
- func BearerAuthentication(tokenAuthenticator TokenAuthenticator, contextKey interface{}) AuthenticationFunc
- func TokenHeaderAuthentication(tokenAuthenticator TokenAuthenticator, contextKey interface{}, header string) AuthenticationFunc
- type SingleTokenAuthenticator
- type SingleUserAuthenticator
- type TokenAuthenticator
- type UserAuthenticator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticationHandler ¶
func AuthenticationHandler(handler http.Handler, authenticationFunc AuthenticationFunc) http.Handler
func BearerAuthenticationHandler ¶
func BearerAuthenticationHandler(handler http.Handler, tokenAuthenticator TokenAuthenticator, contextKey interface{}) http.Handler
Types ¶
type AuthenticationFunc ¶
func BasicAuthentication ¶
func BasicAuthentication(realm string, userAuthenticator UserAuthenticator, contextKey interface{}) AuthenticationFunc
func BearerAuthentication ¶
func BearerAuthentication(tokenAuthenticator TokenAuthenticator, contextKey interface{}) AuthenticationFunc
func TokenHeaderAuthentication ¶
func TokenHeaderAuthentication(tokenAuthenticator TokenAuthenticator, contextKey interface{}, header string) AuthenticationFunc
type SingleTokenAuthenticator ¶
type SingleTokenAuthenticator struct {
// contains filtered or unexported fields
}
func NewSingleTokenAuthenticator ¶
func NewSingleTokenAuthenticator(id id.ID) *SingleTokenAuthenticator
func (*SingleTokenAuthenticator) AuthenticateToken ¶
func (s *SingleTokenAuthenticator) AuthenticateToken(id id.ID) (interface{}, bool, error)
type SingleUserAuthenticator ¶
type SingleUserAuthenticator struct {
// contains filtered or unexported fields
}
func NewSingleUserAuthenticator ¶
func NewSingleUserAuthenticator(username, password string) *SingleUserAuthenticator
func (*SingleUserAuthenticator) AuthenticateUser ¶
func (s *SingleUserAuthenticator) AuthenticateUser(username, password string) (info interface{}, authentic bool, err error)
type TokenAuthenticator ¶
type UserAuthenticator ¶
Click to show internal directories.
Click to hide internal directories.