Versions in this module Expand all Collapse all v6 v6.18.0 Oct 3, 2022 Changes in this version + const DemoToken + var ErrDecodingPrivateKey = errors.New("could not decode private key") + var ErrTokenExpired = errors.New("token expired and no private key is set") + type AuthRequest struct + ExpirationTime string + GlobalKey bool + Label string + Login string + Nonce string + ReadOnly bool + type Authenticator struct + BasePath string + HTTPClient *http.Client + KeyManager KeyManager + Login string + PrivateKeyBody []byte + ReadOnly bool + Token jwt.Token + TokenCache TokenCache + TokenExpiration time.Duration + Whitelisted bool + func (a *Authenticator) GetToken() (jwt.Token, error) + type FileTokenCache struct + CacheItems []cacheItem + File *os.File + func NewFileTokenCache(path string) (*FileTokenCache, error) + func (f *FileTokenCache) Get(key string) (jwt.Token, error) + func (f *FileTokenCache) Set(key string, token jwt.Token) error + type KeyManager interface + SignExternally func(body []byte) (string, error) + type TokenCache interface + Get func(key string) (jwt.Token, error) + Set func(key string, token jwt.Token) error