integrations

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOauth2ClientCredentials

func NewOauth2ClientCredentials(clientID, clientSecret, tokenUrl string, scopes []string) auth.Authenticator

Types

type Authenticator added in v1.3.6

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

Authenticator uses TokenStorage to add auth headers

func NewAuthenticator added in v1.3.6

func NewAuthenticator(ts *TokenStorage) *Authenticator

NewAuthenticator creates a new Authenticator with TokenStorage

func (*Authenticator) Authenticate added in v1.3.6

func (a *Authenticator) Authenticate(r *http.Request) error

type TokenStorage added in v1.3.6

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

TokenStorage is a thread-safe wrapper for the token

func NewTokenStorage added in v1.3.6

func NewTokenStorage(initialToken string) *TokenStorage

NewTokenStorage creates a new TokenStorage instance

func (*TokenStorage) Get added in v1.3.6

func (ts *TokenStorage) Get() string

Get retrieves the token

func (*TokenStorage) Update added in v1.3.6

func (ts *TokenStorage) Update(newToken string)

Update updates the token

Jump to

Keyboard shortcuts

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