auth

package
v0.0.0-...-61856c7 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config = &oauth2.Config{}
	Token  *oauth2.Token

	Params = &params{
		MustPaste:   config.Init.MustPaste,
		MustShowURL: config.Init.MustShowURL,

		CodeVerifier: pkce.RandomString(43),
		Request: request{
			State:               pkce.RandomString(10),
			CodeChallengeMethod: "S256",
			Scopes:              []string{gmail.GmailLabelsScope},
		},
	}
)

Functions

func GetToken

func GetToken(conf *oauth2.Config, token **oauth2.Token, params *params)

func NewGmailService

func NewGmailService(conf *oauth2.Config, token *oauth2.Token) (*gmail.Service, error)

func ReadToken

func ReadToken(tokenFile string, token **oauth2.Token) error

func SaveToken

func SaveToken(tokenPath string, token *oauth2.Token)

Types

This section is empty.

Jump to

Keyboard shortcuts

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