auth

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	IDToken   string    `json:"id_token"`
	ExpiresAt time.Time `json:"expires_at"`
}

Token represents an ID token.

type TokenProvider

type TokenProvider interface {
	// GetToken returns an authentication token which can be used to authenticate requests to the Capturl API.
	GetToken() (*Token, error)
}

TokenProvider is the interface for a token provider.

func NewTokenProvider

func NewTokenProvider(refreshToken string, opts ...TokenProviderOption) TokenProvider

NewTokenProvider creates a new token provider.

type TokenProviderOption

type TokenProviderOption func(*tokenProviderConfig)

func WithClient

func WithClient(client *http.Client) TokenProviderOption

func WithRefreshURL

func WithRefreshURL(refreshURL string) TokenProviderOption

Jump to

Keyboard shortcuts

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