Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACRTokenExchanger ¶
type ACRTokenExchanger struct {
// contains filtered or unexported fields
}
ACRTokenExchanger basic implementation for IACRTokenExchanger interface
func NewACRTokenExchanger ¶
func NewACRTokenExchanger(instrumentationProvider instrumentation.IInstrumentationProvider, httpClient httpclient.IHttpClient, retryPolicy retrypolicy.IRetryPolicy) *ACRTokenExchanger
NewACRTokenExchanger Ctor
func (*ACRTokenExchanger) ExchangeACRAccessToken ¶
func (tokenExchanger *ACRTokenExchanger) ExchangeACRAccessToken(registry string, armToken string) (string, error)
ExchangeACRAccessToken receives registry endpoint and an armToken (token to azure mgmt.) and exchanges it to an ACR refresh token and returns it Generates an HTTP call to registry/oauth2/exchange rest api to exchange the token
type ACRTokenProvider ¶
type ACRTokenProvider struct {
// contains filtered or unexported fields
}
ACRTokenProvider azure based implementation of IACRTokenProvider
func NewACRTokenProvider ¶
func NewACRTokenProvider(instrumentationProvider instrumentation.IInstrumentationProvider, tokenExchanger IACRTokenExchanger, azureBearerAuthorizerTokenProvider azureauth.IBearerAuthorizerTokenProvider, cacheClient cache.ICacheClient, acrTokenProviderConfiguration *ACRTokenProviderConfiguration) *ACRTokenProvider
NewACRTokenProvider Ctor
func (*ACRTokenProvider) GetACRRefreshToken ¶
func (tokenProvider *ACRTokenProvider) GetACRRefreshToken(registry string) (string, error)
GetACRRefreshToken provides a refresh token (used for generating access-token to registry data plane)
for registry provided.
Refersh and extract ARM token from azure authorizer, then exchange it to refersh token using token exchanger
type ACRTokenProviderConfiguration ¶
type ACRTokenProviderConfiguration struct { // RegistryRefreshTokenCacheExpirationTime is the expiration time **IN MINUTES** for registryRefreshToken in the cache client RegistryRefreshTokenCacheExpirationTime int }
ACRTokenProviderConfiguration is configuration data for ACRTokenProvider
type IACRTokenExchanger ¶
type IACRTokenExchanger interface { // ExchangeACRAccessToken receives registry endpoint and an armToken (token to azure mgmt.) and // exchanges it to an ACR refresh token and returns it ExchangeACRAccessToken(registry string, armToken string) (string, error) }
IACRTokenExchanger responsible to exchange ARM token to ACR refresh token
type IACRTokenProvider ¶
type IACRTokenProvider interface { // GetACRRefreshToken provide a refresh token (used for generating access-token to registry data plane) // for registry provided GetACRRefreshToken(registry string) (string, error) }
IACRTokenProvider responsible to provide a token to ACR registry