auth

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleAuth

type GoogleAuth struct {
	// Path to credentials.json for your google cloud API.
	CredentialFile string
	// Where to PoST the token following authentication.
	RedirectURL string
	// filename where to save the token(or where token.json is located)
	TokenFile string
	// The TokenServer to handle access token requests.
	TokenServer *server.AccessTokenServer
}

Configures authentication to google cloud.

func (*GoogleAuth) GetClient

func (auth *GoogleAuth) GetClient() (*http.Client, error)

Reads credentials.json and configures an *http.Client with the access_token. If the access token does not exist, its created(required the signin with google prompt)

Jump to

Keyboard shortcuts

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