Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrCredentialsHomeNotFound returned when a user home directory can't be located. ErrCredentialsHomeNotFound = errors.New("user home directory not found") // ErrCredentialsFileNotFound returned when the required aws credentials file doesn't exist. ErrCredentialsFileNotFound = errors.New("aws credentials file not found") )
var (
ErrMissingAssertion = ErrMissingElement{Tag: assertionTag}
)
ErrMissingAssertion indicates that an appropriate assertion element could not be found in the SAML Response
Functions ¶
func ExtractAwsRoles ¶
Types ¶
type ADFSClient ¶
type ADFSClient struct {
// contains filtered or unexported fields
}
ADFSClient wrapper around ADFS enabling authentication and retrieval of assertions
func NewADFSClient ¶
func NewADFSClient(endpointURL string, skipVerify bool) (*ADFSClient, error)
NewADFSClient create a new ADFS client
func (*ADFSClient) Authenticate ¶
func (ac *ADFSClient) Authenticate(creds *LoginCreds) (string, error)
Authenticate authenticate to ADFS and return the data from the body of the SAML assertion.
type AWSRole ¶
AWSRole aws role attributes
func PromptForAWSRoleSelection ¶
PromptForAWSRoleSelection present a list of roles to the user for selection
type CredentialsProvider ¶
CredentialsProvider loads aws credentials file
func NewSharedCredentials ¶
func NewSharedCredentials(profile string) *CredentialsProvider
NewSharedCredentials helper to create the credentials provider
func (*CredentialsProvider) Exists ¶
func (p *CredentialsProvider) Exists() error
Exists verify that the credentials file exists
func (*CredentialsProvider) Save ¶
func (p *CredentialsProvider) Save(id, secret, token string) error
Save persist the credentials
type ErrMissingElement ¶
type ErrMissingElement struct {
Tag, Attribute string
}
ErrMissingElement is the error type that indicates an element and/or attribute is missing. It provides a structured error that can be more appropriately acted upon.
func (ErrMissingElement) Error ¶
func (e ErrMissingElement) Error() string
type LoginCreds ¶
LoginCreds credentials used to authenticate to ADFS
func PromptForLoginCreds ¶
func PromptForLoginCreds() (*LoginCreds, error)
PromptForLoginCreds prompt the user to present their username and password