auth

package
v0.0.0-...-d18f405 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTokenFromWeb

func GetTokenFromWeb(ctx context.Context, config *oauth2.Config) (*oauth2.Token, error)

GetTokenFromWeb requests a token from the web, then returns the retrieved token.

func SaveTokenToFile

func SaveTokenToFile(path string, token *oauth2.Token) error

SaveTokenToFile saves a token to a file path.

Types

type Authenticator

type Authenticator struct {
	Config *oauth2.Config
	State  string
	Token  *oauth2.Token
}

Authenticator contains all that's needed to authenticate against OAuth2

func Authenticate

func Authenticate(credentialsPath string, tokenPath string, noAuth bool) (*Authenticator, error)

Jump to

Keyboard shortcuts

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