Documentation ¶
Index ¶
- Constants
- type Assertion
- type Attribute
- type AttributeStatement
- type AttributeValue
- type Conditions
- type GetAwsCredentialsInput
- type GetAwsCredentialsOutput
- type NameID
- type NewInput
- type OktaClient
- type OktaUserAuthn
- type OktaUserAuthnEmbedded
- type OktaUserAuthnFactor
- type OktaUserAuthnFactorEmbedded
- type OktaUserAuthnFactorEmbeddedChallenge
- type OktaUserAuthnFactorEmbeddedVerification
- type OktaUserAuthnFactorEmbeddedVerificationLinks
- type OktaUserAuthnFactorEmbeddedVerificationLinksComplete
- type Response
- type Status
- type StatusCode
- type Subject
- type SubjectConfirmation
- type SubjectConfirmationData
Constants ¶
const ( // YubiKey the hardware mfa constant YubiKey = "token:hardware" // MfaPush the push notification constant MfaPush = "push" // MfaCode the code input constant MfaCode = "token:software:totp" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assertion ¶
type Assertion struct { XMLName xml.Name ID string `xml:"ID,attr"` Version string `xml:"Version,attr"` XS string `xml:"xmlns:xs,attr"` XSI string `xml:"xmlns:xsi,attr"` SAML string `xml:"saml,attr"` IssueInstant string `xml:"IssueInstant,attr"` Subject Subject Conditions Conditions AttributeStatement AttributeStatement }
Assertion struct
type Attribute ¶
type Attribute struct { XMLName xml.Name Name string `xml:",attr"` FriendlyName string `xml:",attr"` NameFormat string `xml:",attr"` AttributeValues []AttributeValue `xml:"AttributeValue"` }
Attribute struct
type AttributeStatement ¶
AttributeStatement struct
type AttributeValue ¶
type AttributeValue struct { XMLName xml.Name Type string `xml:"xsi:type,attr"` Value string `xml:",innerxml"` }
AttributeValue struct
type Conditions ¶
type Conditions struct { XMLName xml.Name NotBefore string `xml:",attr"` NotOnOrAfter string `xml:",attr"` }
Conditions struct
type GetAwsCredentialsInput ¶
type GetAwsCredentialsInput struct { RoleArn string // RoleArn The Role ARN to assume. The user needs to have permission to assume the role in okta Expiration int64 // Expiration in seconds }
GetAwsCredentialsInput : The input for the function
type GetAwsCredentialsOutput ¶
type GetAwsCredentialsOutput struct { AwsAccessKeyId string // AwsAccessKeyId AwsSecretAccessKey string // AwsSecretAccessKey AwsSessionToken string // AwsSessionToken }
GetAwsCredentialsOutput : The output for the function
type OktaClient ¶
type OktaClient struct { Principle string Role string SamlData *samlresp Username string Password string UserAuth *OktaUserAuthn OktaAwsSAMLUrl string CookieJar http.CookieJar OktaUrl string AwsSamlUrl string }
OktaClient struct for methods
func (*OktaClient) GetAwsCredentials ¶
func (o *OktaClient) GetAwsCredentials(i GetAwsCredentialsInput) (GetAwsCredentialsOutput, error)
GetAwsCredentials : Returns the secret,access and session token
func (*OktaClient) GetSamlAssertion ¶
func (o *OktaClient) GetSamlAssertion() error
GetSamlAssertion This is the third step of the authentication chain where we obtain the SAML assertion.
func (*OktaClient) LdapLogin ¶
func (o *OktaClient) LdapLogin() error
LdapLogin takes in user and password and authenticate against okta
type OktaUserAuthn ¶
type OktaUserAuthn struct { StateToken string `json:"stateToken"` SessionToken string `json:"sessionToken"` ExpiresAt string `json:"expiresAt"` Status string `json:"status"` Embedded OktaUserAuthnEmbedded `json:"_embedded"` FactorResult string `json:"factorResult"` CookieJar http.CookieJar }
OktaUserAuthn a struct
type OktaUserAuthnEmbedded ¶
type OktaUserAuthnEmbedded struct { Factors []OktaUserAuthnFactor `json:"factors"` Factor OktaUserAuthnFactor `json:"factor"` }
OktaUserAuthnEmbedded struct
type OktaUserAuthnFactor ¶
type OktaUserAuthnFactor struct { Id string `json:"id"` FactorType string `json:"factorType"` Provider string `json:"provider"` Embedded OktaUserAuthnFactorEmbedded `json:"_embedded"` }
OktaUserAuthnFactor struct
type OktaUserAuthnFactorEmbedded ¶
type OktaUserAuthnFactorEmbedded struct { Verification OktaUserAuthnFactorEmbeddedVerification `json:"verification"` Challange OktaUserAuthnFactorEmbeddedChallenge `json:"challenge"` }
OktaUserAuthnFactorEmbedded struct
type OktaUserAuthnFactorEmbeddedChallenge ¶
type OktaUserAuthnFactorEmbeddedChallenge struct {
CorrectAnswer int `json:"correctAnswer"`
}
OktaUserAuthnFactorEmbeddedChallenge
type OktaUserAuthnFactorEmbeddedVerification ¶
type OktaUserAuthnFactorEmbeddedVerification struct { Host string `json:"host"` Signature string `json:"signature"` FactorResult string `json:"factorResult"` Links OktaUserAuthnFactorEmbeddedVerificationLinks `json:"_links"` }
OktaUserAuthnFactorEmbeddedVerification struct
type OktaUserAuthnFactorEmbeddedVerificationLinks ¶
type OktaUserAuthnFactorEmbeddedVerificationLinks struct {
Complete OktaUserAuthnFactorEmbeddedVerificationLinksComplete `json:"complete"`
}
OktaUserAuthnFactorEmbeddedVerificationLinks struct
type OktaUserAuthnFactorEmbeddedVerificationLinksComplete ¶
type OktaUserAuthnFactorEmbeddedVerificationLinksComplete struct {
Href string `json:"href"`
}
OktaUserAuthnFactorEmbeddedVerificationLinksComplete struct
type Response ¶
type Response struct { XMLName xml.Name SAMLP string `xml:"xmlns:samlp,attr"` SAML string `xml:"xmlns:saml,attr"` SAMLSIG string `xml:"xmlns:samlsig,attr"` Destination string `xml:"Destination,attr"` ID string `xml:"ID,attr"` Version string `xml:"Version,attr"` IssueInstant string `xml:"IssueInstant,attr"` InResponseTo string `xml:"InResponseTo,attr"` Assertion Assertion `xml:"Assertion"` Status Status `xml:"Status"` // contains filtered or unexported fields }
Response struct
type Status ¶
type Status struct { XMLName xml.Name StatusCode StatusCode `xml:"StatusCode"` }
Status struct
type StatusCode ¶
StatusCode struct
type Subject ¶
type Subject struct { XMLName xml.Name NameID NameID SubjectConfirmation SubjectConfirmation }
Subject struct
type SubjectConfirmation ¶
type SubjectConfirmation struct { XMLName xml.Name Method string `xml:",attr"` SubjectConfirmationData SubjectConfirmationData }
SubjectConfirmation struct
type SubjectConfirmationData ¶
type SubjectConfirmationData struct { InResponseTo string `xml:",attr"` NotOnOrAfter string `xml:",attr"` Recipient string `xml:",attr"` }
SubjectConfirmationData struct