Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Refresh ¶
func Refresh(log *util.Logger, token *oauth2.Token, ts oauth2.TokenSource, optMaxTokenLifetime ...time.Duration)
Refresh refreshes the token every 5m. If token refresh fails 5 times, it is aborted.
func RefreshTokenSource ¶
func RefreshTokenSource(token *oauth2.Token, refresher TokenRefresher) oauth2.TokenSource
Types ¶
type Token ¶
Token is an OAuth token that supports the expires_in attribute
func (*Token) UnmarshalJSON ¶
type TokenRefresher ¶
type TokenSource ¶
type TokenSource struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.