token

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(r io.Reader, w io.Writer) (string, error)

Code ...

func CredName

func CredName(p, r string) string

CredName ...

func Expiry

func Expiry(env string) string

Expiry ...

func GetMFADevice

func GetMFADevice(cfg aws.Config, device string) (string, error)

GetMFADevice ...

func LoadLocalConfig

func LoadLocalConfig(profile, region string) (aws.Config, error)

LoadLocalConfig ...

func LookupRole

func LookupRole(role string, roleData io.Reader) (string, error)

LookupRole validates a role.

Types

type Creds

type Creds struct {
	sts.Credentials
}

Creds ...

func GetToken

func GetToken(conf aws.Config, serial, token, role string, dur int64) (Creds, error)

GetToken ...

func (Creds) JSON

func (c Creds) JSON() string

JSON ...

func (Creds) Shell

func (c Creds) Shell() string

Shell ...

func (Creds) String

func (c Creds) String() string

String ...

type Flags

type Flags struct {
	Format    string
	Profile   string
	Region    string
	Role      string
	RoleFile  string
	MFADevice string
	Duration  int64
	RoleIsARN bool
	Expiry    bool
	Stdout    bool
	Verbose   bool
}

Flags holds the config data.

func ParseConfig

func ParseConfig(profile, region, roleName, roleFile, mfaDevice, sessDef string, args []string) Flags

ParseConfig returns the cmd line flags converted to a Flags struct.

Jump to

Keyboard shortcuts

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