manager

package
v0.0.0-...-543d84f Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ClientID       string        `envconfig:"CLIENT_ID" env:"CLIENT_ID"`
	ClientSecret   string        `envconfig:"CLIENT_SECRET" env:"CLIENT_SECRET"`
	Scopes         []string      `envconfig:"SCOPES" env:"SCOPES"`
	Endpoint       Endpoint      `envconfig:"ENDPOINT" env:"ENDPOINT"`
	Audience       string        `envconfig:"AUDIENCE" env:"AUDIENCE"`
	RequestTimeout time.Duration `envconfig:"REQUEST_TIMEOUT" env:"REQUEST_TIMEOUT" default:"10s"`
	TickFrequency  time.Duration `` /* 160-byte string literal not displayed */
}

func (Config) ToClientCrendtials

func (c Config) ToClientCrendtials() clientcredentials.Config

ToClientCrendtials converts to clientcredentials.Config

type Endpoint

type Endpoint struct {
	TokenURL string `envconfig:"TOKEN_URL" env:"TOKEN_URL"`
}

type Manager

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

Manager holds certificates from filesystem watched for changes

func NewManagerFromConfiguration

func NewManagerFromConfiguration(config Config, tlsCfg *tls.Config) (*Manager, error)

NewManagerFromConfiguration creates a new oauth manager which refreshing token.

func (*Manager) Close

func (a *Manager) Close()

Close ends watching token

func (*Manager) GetToken

func (a *Manager) GetToken(ctx context.Context) (*oauth2.Token, error)

GetToken returns token for clients

Jump to

Keyboard shortcuts

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