Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoSAMLResponse = errors.New("okta: SAMLResponse form input not found") ErrNoAWSRoles = errors.New("okta: no AWS roles in SAML assertion") ErrInvalidAWSRole = errors.New("okta: specified role is not available") )
Possible errors returned when parsing AWS SAML assertion.
var ErrRateLimit = errors.New("okta: request rate limit exceeded")
ErrRateLimit is returned when too many requests are sent.
Functions ¶
This section is empty.
Types ¶
type AWSAuth ¶
type AWSAuth struct { Assertion samlAssertion Roles []awsRole }
AWSAuth contains authentication data for AWS.
type AppLink ¶
type AppLink struct { ID string Label string LinkURL string LogoURL string AppName string AppInstanceID string AppAssignmentID string CredentialsSetup bool Hidden bool SortOrder int }
AppLink is an app that the user can access.
type Authenticator ¶
type Authenticator interface { Username() (string, error) Password() (string, error) Select(c []Choice) (Choice, error) Input(c Choice) (string, error) Notify(format string, a ...interface{}) }
Authenticator implements the user interface for multi-factor authentication.
type Client ¶
Client provides access to Okta API.
func NewClient ¶
NewClient returns a new Okta API client for the specified subdomain (e.g. your-org.okta.com or dev-12345.oktapreview.com).
func (*Client) Authenticate ¶
func (c *Client) Authenticate(authn Authenticator) error
Authenticate performs user authentication and creates a new session.
func (*Client) CloseSession ¶
CloseSession destroys the current session.
func (*Client) OpenAWS ¶
OpenAWS returns SAML authentication data for the AWS app specified by appLink. If roleARN is specified, the matching AWS role is pre-selected.
func (*Client) RefreshSession ¶
RefreshSession extends the expiration time of the current session.
func (*Client) ValidSession ¶
ValidSession returns true if the client has a valid Okta session ID.
type Error ¶
type Error struct { Code string `json:"errorCode"` Summary string `json:"errorSummary"` Link string `json:"errorLink"` ReqID string `json:"errorId"` Causes []*Error `json:"errorCauses"` }
Error is an error report from Okta.
type Factor ¶
type Factor struct { ID string `json:"id"` FactorType string `json:"factorType"` Provider string `json:"provider"` VendorName string `json:"vendorName"` Profile profile `json:"profile"` Links struct{ Verify *link } `json:"_links"` // contains filtered or unexported fields }
Factor is a factor object returned by MFA_ENROLL, MFA_REQUIRED, or MFA_CHALLENGE authentication responses.