auth

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CredFileName is the name of the credential file written to the CLI's
	// config directory
	CredFileName = "cred_file.json"

	// CredentialsDir is the directory to store credentials from authentication.
	CredentialsDir = "~/.config/hcp/credentials/"
)

Variables

This section is empty.

Functions

func GetHCPConfig

func GetHCPConfig(options ...hcpconf.HCPConfigOption) (hcpconf.HCPConfig, error)

GetHCPConfig retrieves the HCP configuration with geography support. Geography configuration is handled by the HCP SDK through the WithGeography option.

func GetHCPConfigFromDir

func GetHCPConfigFromDir(credFileDir string, options ...hcpconf.HCPConfigOption) (hcpconf.HCPConfig, error)

GetHCPConfigFromDir is like GetHCPConfig but can search non-default directories.

func GetHCPCredFilePath

func GetHCPCredFilePath(credFileDir string) (string, error)

GetHCPCredFilePath returns the path to the cli's credential file.

func IsAuthenticated added in v0.2.0

func IsAuthenticated() (bool, error)

IsAuthenticated returns if there is a valid token available.

Types

This section is empty.

Jump to

Keyboard shortcuts

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