config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 17 Imported by: 3

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
	ClientSecret string
	Endpoint     endpoint.Endpoint
	RedirectURL  string
	Scopes       []string

	FetchOptions []fetch_config.Option
}

func (*Config) AuthCodeURL

func (c *Config) AuthCodeURL(state string, opts ...auth_code_option.AuthCodeOption) string

func (*Config) Client

func (c *Config) Client(ctx context.Context, t *token.Token) *http.Client

Client returns an *http.Client that automatically sets OAuth2 authorization headers using a token source that refreshes the provided token as needed.

func (*Config) ClientCredentialsToken

func (c *Config) ClientCredentialsToken(ctx context.Context) (*token.Token, error)

func (*Config) Exchange

func (c *Config) Exchange(ctx context.Context, code string, opts ...auth_code_option.AuthCodeOption) (*token.Token, error)

func (*Config) PasswordCredentialsToken

func (c *Config) PasswordCredentialsToken(ctx context.Context, username, password string) (*token.Token, error)

func (*Config) TokenSource

func (c *Config) TokenSource(ctx context.Context, t *token.Token) token_source.TokenSource

Jump to

Keyboard shortcuts

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