auth

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 10 Imported by: 0

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