Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenProvider ¶
type TokenProvider struct { // InsecureDisableTLS disables TLS. This is only used if the user is connecting to localhost // and is using an emulator connection string. See [ConnectionStringProperties.Emulator] for // details. InsecureDisableTLS bool // contains filtered or unexported fields }
TokenProvider handles access tokens and expiration calculation for SAS keys (via connection strings) or TokenCredentials from Azure Identity.
func NewTokenProvider ¶
func NewTokenProvider(tokenCredential azcore.TokenCredential) *TokenProvider
NewTokenProvider creates a tokenProvider from azcore.TokenCredential.
func NewTokenProviderWithConnectionString ¶
func NewTokenProviderWithConnectionString(props exported.ConnectionStringProperties) (*TokenProvider, error)
NewTokenProviderWithConnectionString creates a tokenProvider from a connection string.
func (*TokenProvider) GetToken ¶
func (tp *TokenProvider) GetToken(uri string) (*auth.Token, error)
GetToken will retrieve a new token. This function makes us compatible with auth.TokenProvider.
func (*TokenProvider) GetTokenAsTokenProvider ¶
func (tp *TokenProvider) GetTokenAsTokenProvider(uri string) (*singleUseTokenProvider, time.Time, error)
GetToken returns a token (that is compatible as an auth.TokenProvider) and the calculated time when you should renew your token.
Click to show internal directories.
Click to hide internal directories.