external

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCredentials

func GetCredentials(ctx context.Context) (string, string, error)

Types

type Auth

type Auth struct {
	Username string
	Password string
	// Token is the 2FA token
	Token string
	// RefreshToken is used to refresh the token when
	// it expires
	RefreshToken string
}

Auth represents user authentication.

func (*Auth) TokenExpired

func (a *Auth) TokenExpired() bool

TokenExpired returns true if the token is malformed or is expired, true otherwise.

type Store

type Store interface {
	GetAuth() (*Auth, error)
	Store(auth Auth) error
	Erase() error
}

Store stores and retrieves user auth information form the keystore.

func NewStore

func NewStore(provider func(string) dockercredentials.Store) Store

NewStore creates a new credentials store.

Jump to

Keyboard shortcuts

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