authclient

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteToken

func DeleteToken(store Keyring, serviceURL string) error

func StoreToken

func StoreToken(store Keyring, serviceURL, token string) error

func StoredToken

func StoredToken(store Keyring, serviceURL string) (string, error)

Types

type GitHubActions

type GitHubActions struct {
	HTTP *http.Client
}

func (GitHubActions) Available

func (g GitHubActions) Available() bool

func (GitHubActions) IDToken

func (g GitHubActions) IDToken(ctx context.Context, audience string) (string, error)

type Keyring

type Keyring interface {
	Get(service, user string) (string, error)
	Set(service, user, password string) error
	Delete(service, user string) error
}

type ResolveOptions

type ResolveOptions struct {
	ExplicitToken string
	ServiceURL    string
	Keyring       Keyring
	OIDC          func(context.Context) (string, error)
}

type Source

type Source string
const (
	SourceExplicit    Source = "explicit"
	SourceEnvironment Source = "environment"
	SourceKeyring     Source = "keyring"
	SourceOIDC        Source = "oidc"
)

func Resolve

func Resolve(ctx context.Context, options ResolveOptions) (string, Source, error)

type SystemKeyring

type SystemKeyring struct{}

func (SystemKeyring) Delete

func (SystemKeyring) Delete(service, user string) error

func (SystemKeyring) Get

func (SystemKeyring) Get(service, user string) (string, error)

func (SystemKeyring) Set

func (SystemKeyring) Set(service, user, password string) error

Jump to

Keyboard shortcuts

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