auth

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClearHostTokenFunc = func(host string) error {
	return config.ClearHostToken(host)
}

ClearHostTokenFunc is the function used to clear the token from hosts.yml. Tests may override this to avoid touching the real config file.

View Source
var DeleteTokenFunc = func(host string) error {
	return internalauth.DeleteToken(host)
}

DeleteTokenFunc is the function used to remove the keyring token. Tests may override this to avoid touching the real keyring.

View Source
var DeviceLoginFunc = func(host string, ios *iostreams.IOStreams) (string, error) {
	return internalauth.DeviceLogin(host, ios)
}

DeviceLoginFunc is the function used to perform device-code login. Tests may override this to avoid real network calls.

View Source
var FetchTokenInfoFunc = func(host, token string) (internalauth.TokenInfo, error) {
	return internalauth.FetchTokenInfo(host, token)
}

FetchTokenInfoFunc is the function used to fetch session details from the server. Tests may override this to avoid real HTTP calls.

View Source
var ResolveTokenFunc = func(host string) (internalauth.ResolvedToken, error) {
	return internalauth.ResolveToken(host)
}

ResolveTokenFunc is the function used to resolve the auth token. Tests may override this to avoid real keyring/config access.

View Source
var SetTokenFunc = func(host, token string) error {
	return config.SetHostToken(host, token)
}

SetTokenFunc is the function used to store a token in hosts.yml. Tests may override this to avoid touching the real config.

Functions

func NewAuthCmd

func NewAuthCmd(f *cmdutil.Factory) *cobra.Command

func NewLoginCmd

func NewLoginCmd(f *cmdutil.Factory) *cobra.Command

func NewLogoutCmd

func NewLogoutCmd(f *cmdutil.Factory) *cobra.Command

func NewStatusCmd

func NewStatusCmd(f *cmdutil.Factory) *cobra.Command

Types

This section is empty.

Jump to

Keyboard shortcuts

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