sso

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command added in v0.20.0

func Command() *cli.Command

func CopyFile

func CopyFile(src, dst string) error

func NewAwsConfig

func NewAwsConfig(ctx context.Context, creds *aws.Credentials, opts ...func(*config.LoadOptions) error) (aws.Config, error)

func NewSsoProfiles

func NewSsoProfiles() map[string]AwsProfile

func WriteSsoProfiles

func WriteSsoProfiles(profiles map[string]AwsProfile) error

Types

type AwsProfile

type AwsProfile struct {
	StartUrl          string `ini:"granted_sso_start_url"`
	Region            string `ini:"granted_sso_region"`
	AccountId         string `ini:"granted_sso_account_id"`
	Role              string `ini:"granted_sso_role_name"`
	CredentialProcess string `ini:"credential_process"`
}

type Browser added in v0.12.0

type Browser struct {
	Browser    string
	SSOBrowser string
	Verbose    bool
}

func NewBrowser added in v0.20.0

func NewBrowser(browser string, ssoBrowser string, verbose bool) *Browser

func (*Browser) Execute added in v0.12.0

func (p *Browser) Execute(ctx context.Context) error

func (*Browser) GetBrowserSelection added in v0.20.0

func (p *Browser) GetBrowserSelection(stdio survey.AskOpt, browserName string) (error, string, string)

type Configure added in v0.12.0

type Configure struct {
	Verbose bool
}

func NewConfigure added in v0.20.0

func NewConfigure(verbose bool) *Configure

func (*Configure) ConfigureProfiles added in v0.12.0

func (p *Configure) ConfigureProfiles(ctx context.Context) error

func (*Configure) Execute added in v0.12.0

func (p *Configure) Execute(ctx context.Context) error

func (*Configure) GetAccountAccess added in v0.12.0

func (p *Configure) GetAccountAccess(ctx context.Context, startURL string, region string) (map[string]AwsProfile, error)

type Console added in v0.12.0

type Console struct {
	Profile string
	Region  string
	Service string
	Url     bool
	Verbose bool
	NoCache bool
}

func NewConsole added in v0.20.0

func NewConsole(profile, region, service string, url, verbose, noCache bool) *Console

func (*Console) Execute added in v0.12.0

func (p *Console) Execute(ctx context.Context) error

func (*Console) OpenBrowser added in v0.12.0

func (p *Console) OpenBrowser(ctx context.Context) error

type CredentialProcess added in v0.16.0

type CredentialProcess struct {
	Profile string
	MFATOTP string
	Verbose bool
}

func NewCredentialProcess added in v0.20.0

func NewCredentialProcess(profile, token string, verbose bool) *CredentialProcess

func (*CredentialProcess) Execute added in v0.16.0

func (p *CredentialProcess) Execute(ctx context.Context) error

type Login added in v0.12.0

type Login struct {
	Profile string
	Ask     bool
	MFATOTP string
	Verbose bool
	Url     bool
	NoCache bool
	// contains filtered or unexported fields
}

func NewLogin added in v0.20.0

func NewLogin(profile, token string, ask, verbose, url, noCache bool) *Login

func (*Login) AskAuth added in v0.15.0

func (p *Login) AskAuth() bool

func (*Login) AssumeRoleWithCreds added in v0.15.0

func (p *Login) AssumeRoleWithCreds(ctx context.Context, parentcreds *aws.Credentials) (aws.Credentials, error)

func (*Login) Execute added in v0.12.0

func (p *Login) Execute(ctx context.Context) error

func (*Login) GetCredentials added in v0.12.0

func (p *Login) GetCredentials(ctx context.Context) (*aws.Credentials, error)

func (*Login) GetProfile added in v0.12.0

func (p *Login) GetProfile(profile string) (*awsprofile.Profile, error)

func (*Login) GetProfileFromID added in v0.12.0

func (p *Login) GetProfileFromID(id string) (*awsprofile.Profile, error)

func (*Login) LoadProfiles added in v0.12.0

func (p *Login) LoadProfiles()

func (*Login) LoginMFA added in v0.13.0

func (p *Login) LoginMFA(ctx context.Context) (aws.Credentials, error)

func (*Login) PrintCredentials added in v0.12.0

func (p *Login) PrintCredentials(creds *aws.Credentials)

Jump to

Keyboard shortcuts

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