auth

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const REFRESH_INTERVAL = 10 * time.Minute

Variables

This section is empty.

Functions

func GetExpiryFromJWT

func GetExpiryFromJWT(jwtTokenStr string) (time.Time, error)

func GetNodeAgentToken

func GetNodeAgentToken(confs config.ConfigAuth) string

func IsTokenRefreshRequired

func IsTokenRefreshRequired(tokenExpiry time.Time) bool

func PersistToken

func PersistToken(token string, tokenFile string) error

Types

type ClientAuthToken

type ClientAuthToken struct {
	ClientName  string
	AccessToken string
	Expiry      time.Time
}

type TokenManager

type TokenManager struct {
	TokenClients []ClientAuthToken
}

func NewTokenManager

func NewTokenManager(conf config.ConfigAuth) *TokenManager

func (*TokenManager) PopulateTokenClients

func (tknMgr *TokenManager) PopulateTokenClients(conf config.ConfigAuth)

Jump to

Keyboard shortcuts

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