oauth

package
v0.0.0-...-f411113 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 6 Imported by: 0

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 TokenRefresher

type TokenRefresher interface {
	RefreshToken(token *oauth2.Token) (*oauth2.Token, error)
}

type TokenSource

type TokenSource struct {
	// contains filtered or unexported fields
}

func (*TokenSource) Token

func (ts *TokenSource) Token() (*oauth2.Token, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL