tokenstore

package
v0.0.0-...-bcb0865 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenSet

type TokenSet struct {
	AccessToken string
	ExpiresAt   int64
}

type TokenStore

type TokenStore struct {
	// The git proxy config
	Config *config.GitProxyConfig
	// The git providers
	Providers map[string]config.GitProvider
	// Period used to refresh renku tokens
	RefreshTickerPeriod time.Duration
	// Safety margin for when to consider a token expired. For example if this is set to
	// 30 seconds then the token is considered expired if it expires in the next 30 seconds.
	ExpirationLeeway time.Duration
	// contains filtered or unexported fields
}

func New

func (*TokenStore) GetGitAccessToken

func (s *TokenStore) GetGitAccessToken(provider string, encode bool) (string, error)

Returns a valid access token for the corresponding git provider. If the token is expired, a new one will be retrieved using the renku access token.

Jump to

Keyboard shortcuts

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