Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 New(c *config.GitProxyConfig) *TokenStore
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.
Click to show internal directories.
Click to hide internal directories.