auth

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotAuthenticated is returned when the user is not logged in
	ErrNotAuthenticated = errors.New("not authenticated")
)

Functions

func ClearCredentials

func ClearCredentials() error

ClearCredentials removes stored credentials

func GetRegistryURL

func GetRegistryURL() string

GetRegistryURL returns the registry URL from environment or default

func IsAuthenticated

func IsAuthenticated() bool

IsAuthenticated checks if the user is currently authenticated

func SaveCredentials

func SaveCredentials(creds *Credentials) error

SaveCredentials saves authentication credentials to disk

Types

type Credentials

type Credentials struct {
	Token    string `json:"token"`
	Username string `json:"username"`
}

Credentials stores the user's authentication information

func LoadCredentials

func LoadCredentials() (*Credentials, error)

LoadCredentials loads authentication credentials from disk

Jump to

Keyboard shortcuts

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