Documentation ¶
Index ¶
Constants ¶
View Source
const UserContextKey contextKey = "user"
Variables ¶
View Source
var ErrInvalidPassword = errors.New("invalid password")
View Source
var ErrUserNotFound = errors.New("user not found")
Functions ¶
func CreatePassword ¶
func ParseBearerToken ¶
func RequireAuthentication ¶
func RequireAuthentication(h http.Handler, auth *Authenticator) http.Handler
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func NewAuthenticator ¶
func NewAuthenticator(key []byte, config config.ConfigStore) *Authenticator
Click to show internal directories.
Click to hide internal directories.