Documentation ¶
Overview ¶
Package okta contains functionality for interacting with the Okta REST API.
Index ¶
Constants ¶
const ( AuthExceptionCode = "E000004" OktaAPIBaseURL = "https://%s.okta.com/api/v1" PasswordExpiredExceptionCode = "E000064" PasswordExpiredSummary = "Password is expired and must be changed." )
API constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct{}
Client is a client for making Okta API requests.
func (*Client) Authenticate ¶
func (c *Client) Authenticate(req *util.OpenVPNClientRequest) error
Authenticate attempts to authenticate the user credentials in the client request using the Okta API.
The following errors are returned by this function: OktaRequestFailure, OktaResponseFailure, OktaAuthFailure
type EmbeddedResource ¶
type EmbeddedResource struct { User UserObject `json:"user"` Factors []FactorObject `json:"factors"` Policy PolicyObject `json:"policy"` }
EmbeddedResource contains embedded resource information.
type ErrorResponse ¶
type ErrorResponse struct { ErrorCode string `json:"errorCode"` ErrorSummary string `json:"errorSummary"` ErrorLink string `json:"errorLink"` ErrorID string `json:"errorId"` ErrorCauses []ErrorResponse `json:"errorCauses"` }
ErrorResponse contains error information when a REST authentication request fails.
type FactorObject ¶
type FactorObject struct { ID string `json:"id"` FactorType string `json:"factorType"` Provider string `json:"provider"` VendorName string `json:"vendorsName"` Profile json.RawMessage `json:"profile"` Links map[string]LinkResource `json:"_links"` }
FactorObject contains information about a particular MFA factor.
type LinkResource ¶
LinkResource describes links to other resources or API calls.
type PolicyObject ¶
type PolicyObject struct { AllowRememberDevice bool `json:"allowRememberDevice"` RememberDeviceLifetimeInMinutes uint32 `json:"rememberDeviceLifetimeInMinutes"` RememberDeviceByDefault bool `json:"rememberDeviceByDefault"` FactorsPolicyInfo json.RawMessage `json:"factorsPolicyInfo"` }
PolicyObject contains policy information.
type PrimaryAuthResponse ¶
type PrimaryAuthResponse struct { StateToken string `json:"stateToken"` ExpiresAt string `json:"expiresAt"` Status string `json:"status"` Embedded EmbeddedResource `json:"_embedded"` Links map[string]LinkResource `json:"_links"` }
PrimaryAuthResponse contains primary authentication information when authentication succeeds.
type SecondaryAuthResponse ¶
type SecondaryAuthResponse struct { ExpiresAt string `json:"expiresAt"` Status string `json:"status"` FactorResult string `json:"factorResult"` SessionToken string `json:"sessionToken"` }
SecondaryAuthResponse contains secondary authentication information when MFA succeeds.
type UserObject ¶
type UserObject struct { ID string `json:"id"` PasswordChanged string `json:"passwordChanged"` Profile UserProfile `json:"profile"` }
UserObject holds information about a user.