auth

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCredentials

func ValidateCredentials(clientID, clientSecret, refreshToken string) error

ValidateCredentials attempts a token refresh to verify credentials are valid.

Types

type Authenticator

type Authenticator interface {
	AccessToken(ctx context.Context) (string, error)
}

Authenticator handles OAuth2 token management.

type OAuthAuthenticator

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

OAuthAuthenticator refreshes access tokens using OAuth2 credentials.

func NewOAuthAuthenticator

func NewOAuthAuthenticator(clientID, clientSecret, refreshToken string) *OAuthAuthenticator

NewOAuthAuthenticator creates an authenticator from client credentials and a refresh token.

func (*OAuthAuthenticator) AccessToken

func (a *OAuthAuthenticator) AccessToken(ctx context.Context) (string, error)

AccessToken returns a valid access token, refreshing if necessary.

Jump to

Keyboard shortcuts

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