Versions in this module Expand all Collapse all v1 v1.7.17 Aug 31, 2022 Changes in this version + type Auth interface + AuthenticateToken func(token, url string) error + ChangePassword func(oldPW, newPW string) error + CreateHandler func() (http.Handler, error) + NewToken func(pw string, duration time.Duration, endpoints []string) (string, error) + RevokeToken func(pw, token string) error + WrapHandler func(h http.Handler) http.Handler + func New(log logging.Logger, endpoint, pw string) (Auth, error) + func NewFromHash(log logging.Logger, endpoint string, pw password.Hash) Auth + type ChangePasswordArgs struct + NewPassword string + OldPassword string + type NewTokenArgs struct + Endpoints []string + type Password struct + Password string + type RevokeTokenArgs struct + type Service struct + func (s *Service) ChangePassword(_ *http.Request, args *ChangePasswordArgs, _ *api.EmptyReply) error + func (s *Service) NewToken(_ *http.Request, args *NewTokenArgs, reply *Token) error + func (s *Service) RevokeToken(_ *http.Request, args *RevokeTokenArgs, _ *api.EmptyReply) error + type Token struct + Token string