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 ¶ added in v1.0.0
Types ¶
type ADFSClient ¶ added in v1.0.0
type ADFSClient struct {
// contains filtered or unexported fields
}
ADFSClient wrapper around ADFS enabling authentication and retrieval of assertions
func NewADFSClient ¶ added in v1.0.0
func NewADFSClient(endpointURL string, skipVerify bool) (*ADFSClient, error)
NewADFSClient create a new ADFS client
func (*ADFSClient) Authenticate ¶ added in v1.0.0
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 ¶ added in v1.0.0
AWSRole aws role attributes
func PromptForAWSRoleSelection ¶ added in v1.0.0
PromptForAWSRoleSelection present a list of roles to the user for selection
type CredentialsProvider ¶ added in v1.0.0
CredentialsProvider loads aws credentials file
func NewSharedCredentials ¶ added in v1.0.0
func NewSharedCredentials(profile string) *CredentialsProvider
NewSharedCredentials helper to create the credentials provider
func (*CredentialsProvider) Exists ¶ added in v1.0.0
func (p *CredentialsProvider) Exists() error
Exists verify that the credentials file exists
func (*CredentialsProvider) Save ¶ added in v1.0.0
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 ¶ added in v1.0.0
LoginCreds credentials used to authenticate to ADFS
func PromptForLoginCreds ¶ added in v1.0.0
func PromptForLoginCreds() (*LoginCreds, error)
PromptForLoginCreds prompt the user to present their username and password