oauth2util

package
v0.0.0-...-2650da1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthCodeUrl

func GetAuthCodeUrl(config *oauth2.Config) (string, string, string)

Returns a tuple of strings (url, state, verifier)

Parameters:

config - the oauth2 config

func GetGoogleConfig

func GetGoogleConfig(filePath string, scopes ...string) (*oauth2.Config, error)

func GetTokenFromAuthCode

func GetTokenFromAuthCode(ctx context.Context, config *oauth2.Config, authCode string,
	verifier string) (*oauth2.Token, error)

func GetTokenFromFile

func GetTokenFromFile(filePath string) (*oauth2.Token, error)

func SaveTokenToFile

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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