authtoken

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 10 * time.Second
)

Variables

View Source
var (
	ErrTokenRequestFailed = errors.New("authtoken: token request failed")
	ErrNoAccessToken      = errors.New("authtoken: no access token in response")
)

Functions

This section is empty.

Types

type Client

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

func New

func New(tokenURL, clientID, clientSecret string, opts ...Option) *Client

func (*Client) GetToken

func (c *Client) GetToken(ctx context.Context) (string, error)

func (*Client) InvalidateToken

func (c *Client) InvalidateToken()

type Option

type Option func(*Client)

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

Jump to

Keyboard shortcuts

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