authentication

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken added in v1.4.0

func GetToken(credentials settings.AuthenticationSettings, httpSettings *settings.HttpSettings, httpClient *http.Client) (model.Token, *http.Response, error)

Types

type CachedTokenManager added in v1.4.0

type CachedTokenManager struct {
	// contains filtered or unexported fields
}

func (*CachedTokenManager) RefreshToken added in v1.4.0

func (t *CachedTokenManager) RefreshToken(httpSettings *settings.HttpSettings, httpClient *http.Client) (string, error)

type TokenExpiration

type TokenExpiration struct {
	DefaultExpiration time.Duration
	CleanupInterval   time.Duration
}

sets the default expiration time for each generated token and a cleanupInterval to old delete entries

func NewDefaultTokenExpiration

func NewDefaultTokenExpiration() *TokenExpiration

func NewTokenExpiration

func NewTokenExpiration(defaultExpiration time.Duration, cleanupInterval time.Duration) *TokenExpiration

type TokenManager

type TokenManager interface {
	RefreshToken(httpSettings *settings.HttpSettings, httpClient *http.Client) (string, error)
}

func NewTokenManager

func NewTokenManager(credentials settings.AuthenticationSettings, tokenExpiration *TokenExpiration) TokenManager

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL