auth

package
v0.0.0-...-b6f372c Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileSource

func FileSource(path string, token *oauth2.Token, conf *oauth2.Config) oauth2.TokenSource

func NewAccessTokenClient

func NewAccessTokenClient(clientId, clientSecret string, ctx context.Context, accessToken string) *http.Client

func NewFileSourceClient

func NewFileSourceClient(clientId, clientSecret string, ctx context.Context, tokenFile string, authFn authCodeFn) (*http.Client, error)

func NewRefreshTokenClient

func NewRefreshTokenClient(clientId, clientSecret string, ctx context.Context, refreshToken string) *http.Client

func NewServiceAccountClient

func NewServiceAccountClient(serviceAccountFile string, ctx context.Context) (*http.Client, error)

func ReadFile

func ReadFile(path string) ([]byte, bool, error)

func ReadToken

func ReadToken(path string) (*oauth2.Token, bool, error)

func SaveToken

func SaveToken(path 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