auth

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdAuth

func NewCmdAuth(ctx *cmd.Context) *cmd.Command

func NewCmdLogin

func NewCmdLogin(ctx *cmd.Context) *cmd.Command

func NewCmdLogout

func NewCmdLogout(ctx *cmd.Context) *cmd.Command

func NewCmdPrintAccessToken

func NewCmdPrintAccessToken(ctx *cmd.Context) *cmd.Command

Types

type GetIAMClientFunc added in v0.2.0

type GetIAMClientFunc func(c hcpconf.HCPConfig) (iam_service.ClientService, error)

GetIAMClientFunc is the function definition for retrieving an IAM service client from a HCP Config.

type LoginOpts

type LoginOpts struct {
	Ctx     context.Context
	IO      iostreams.IOStreams
	Profile *profile.Profile
	Quiet   bool

	// GetIAM retrieves an IAM service client using the passed HCP Config.
	GetIAM GetIAMClientFunc

	// ConfigFn is used to retrieve a new HCP Config
	ConfigFn NewConfigFunc

	// CredentialDir is the directory to store any necessary credential files.
	CredentialDir string

	// CredentialFile is the path to a credential file to use to login
	CredentialFile string

	// ClientID and ClientSecret are used to authenticate using service
	// principal credentials.
	ClientID     string
	ClientSecret string
}

func (*LoginOpts) Validate

func (o *LoginOpts) Validate() error

type LogoutOpts

type LogoutOpts struct {
	IO iostreams.IOStreams

	// CredentialDir is the directory to store any necessary credential files.
	CredentialDir string
	// contains filtered or unexported fields
}

type NewConfigFunc

type NewConfigFunc func(opts ...hcpconf.HCPConfigOption) (hcpconf.HCPConfig, error)

NewConfigFunc is the function definition for retrieving a new HCPConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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