auth

package
v0.0.0-...-30aa3f0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTokenSourceWithProactiveCache

func DefaultTokenSourceWithProactiveCache(ctx context.Context, scopes ...string) (oauth2.TokenSource, error)

DefaultTokenSourceWithProactiveCache returns the token source for "Application Default Credentials". It is a shortcut for FindDefaultCredentials(ctx, scope).TokenSource.

Types

type Config

type Config struct {
	RenewPeriod time.Duration
	MaxWait     time.Duration
	InitialWait time.Duration
}

type ProactiveCacheTokenSource

type ProactiveCacheTokenSource struct {
	// contains filtered or unexported fields
}

func NewProactiveCacheTokenSource

func NewProactiveCacheTokenSource(ts oauth2.TokenSource, cfg Config) (*ProactiveCacheTokenSource, error)

func (*ProactiveCacheTokenSource) Run

func (*ProactiveCacheTokenSource) Token

type TokenOption

type TokenOption func(opt *tokenOption)

TokenOption provides ability to configure the google TokenSource to issue Google ID Tokens.

Jump to

Keyboard shortcuts

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