Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultTokenProvider ¶
type DefaultTokenProvider struct {
// contains filtered or unexported fields
}
func NewDefaultTokenProvider ¶
func NewDefaultTokenProvider(cache cache.Cache, fetcher TokenFetcher) *DefaultTokenProvider
func (*DefaultTokenProvider) GetAccessToken ¶
func (p *DefaultTokenProvider) GetAccessToken(ctx context.Context) (string, error)
func (*DefaultTokenProvider) RefreshAccessToken ¶
func (p *DefaultTokenProvider) RefreshAccessToken(ctx context.Context) (string, error)
type TokenFetcher ¶
type TokenProvider ¶
type TokenProvider interface { // GetAccessToken retrieves the access token from either the cache or the remote server. GetAccessToken(ctx context.Context) (string, error) // RefreshAccessToken forcefully refreshes the access token, regardless of its expiration status. RefreshAccessToken(ctx context.Context) (string, error) }
Click to show internal directories.
Click to hide internal directories.