credentials

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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