Package com.okta.sdk.resource.api
Class UserFactorApi
java.lang.Object
com.okta.sdk.resource.api.UserFactorApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-08-09T14:19:33.269913-05:00[America/Chicago]",
comments="Generator version: 7.7.0")
public class UserFactorApi
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivateFactor
(String userId, String factorId, UserFactorActivateRequest body) Activate a Factor Activates a Factor.activateFactor
(String userId, String factorId, UserFactorActivateRequest body, Map<String, String> additionalHeaders) Activate a Factor Activates a Factor.enrollFactor
(String userId, UserFactor body, Boolean updatePhone, String templateId, Integer tokenLifetimeSeconds, Boolean activate, String acceptLanguage) Enroll a Factor Enrolls a supported Factor for the specified user.enrollFactor
(String userId, UserFactor body, Boolean updatePhone, String templateId, Integer tokenLifetimeSeconds, Boolean activate, String acceptLanguage, Map<String, String> additionalHeaders) Enroll a Factor Enrolls a supported Factor for the specified user.Retrieve a Factor Retrieves an existing Factor for the specified userRetrieve a Factor Retrieves an existing Factor for the specified usergetFactorTransactionStatus
(String userId, String factorId, String transactionId) Retrieve a Factor transaction status Retrieves the status of a `push` Factor verification transactiongetFactorTransactionStatus
(String userId, String factorId, String transactionId, Map<String, String> additionalHeaders) Retrieve a Factor transaction status Retrieves the status of a `push` Factor verification transactionprotected static com.fasterxml.jackson.databind.ObjectMapper
listFactors
(String userId) List all enrolled Factors Lists all enrolled Factors for the specified userlistFactors
(String userId, Map<String, String> additionalHeaders) List all enrolled Factors Lists all enrolled Factors for the specified userlistSupportedFactors
(String userId) List all supported Factors Lists all the supported Factors that can be enrolled for the specified userlistSupportedFactors
(String userId, Map<String, String> additionalHeaders) List all supported Factors Lists all the supported Factors that can be enrolled for the specified userlistSupportedSecurityQuestions
(String userId) List all supported Security Questions Lists all available Security Questions for the specified userlistSupportedSecurityQuestions
(String userId, Map<String, String> additionalHeaders) List all supported Security Questions Lists all available Security Questions for the specified userresendEnrollFactor
(String userId, String factorId, ResendUserFactor resendUserFactor, String templateId) Resend a Factor enrollment Resends an `sms`, `call`, or `email` factor challenge as part of an enrollment flow.resendEnrollFactor
(String userId, String factorId, ResendUserFactor resendUserFactor, String templateId, Map<String, String> additionalHeaders) Resend a Factor enrollment Resends an `sms`, `call`, or `email` factor challenge as part of an enrollment flow.void
setApiClient
(ApiClient apiClient) void
unenrollFactor
(String userId, String factorId, Boolean removeRecoveryEnrollment) Unenroll a Factor Unenrolls an existing Factor for the specified user.void
unenrollFactor
(String userId, String factorId, Boolean removeRecoveryEnrollment, Map<String, String> additionalHeaders) Unenroll a Factor Unenrolls an existing Factor for the specified user.verifyFactor
(String userId, String factorId, String templateId, Integer tokenLifetimeSeconds, String xForwardedFor, String userAgent, String acceptLanguage, UserFactorVerifyRequest body) Verify a Factor Verifies an OTP for a Factor.verifyFactor
(String userId, String factorId, String templateId, Integer tokenLifetimeSeconds, String xForwardedFor, String userAgent, String acceptLanguage, UserFactorVerifyRequest body, Map<String, String> additionalHeaders) Verify a Factor Verifies an OTP for a Factor.
-
Constructor Details
-
UserFactorApi
public UserFactorApi() -
UserFactorApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
activateFactor
public UserFactor activateFactor(String userId, String factorId, UserFactorActivateRequest body) throws ApiException Activate a Factor Activates a Factor. Some Factors (`call`, `email`, `push`, `sms`, `token:software:totp`, `u2f`, and `webauthn`) require activation to complete the enrollment process. Okta enforces a rate limit of five activation attempts within five minutes. After a user exceeds the rate limit, Okta returns an error message.- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)body
- (optional)- Returns:
- UserFactor
- Throws:
ApiException
- if fails to make API call
-
activateFactor
public UserFactor activateFactor(String userId, String factorId, UserFactorActivateRequest body, Map<String, String> additionalHeaders) throws ApiExceptionActivate a Factor Activates a Factor. Some Factors (`call`, `email`, `push`, `sms`, `token:software:totp`, `u2f`, and `webauthn`) require activation to complete the enrollment process. Okta enforces a rate limit of five activation attempts within five minutes. After a user exceeds the rate limit, Okta returns an error message.- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)body
- (optional)additionalHeaders
- additionalHeaders for this call- Returns:
- UserFactor
- Throws:
ApiException
- if fails to make API call
-
enrollFactor
public UserFactor enrollFactor(String userId, UserFactor body, Boolean updatePhone, String templateId, Integer tokenLifetimeSeconds, Boolean activate, String acceptLanguage) throws ApiException Enroll a Factor Enrolls a supported Factor for the specified user. Some Factor types require a seperate activation to complete the enrollment process. See [Activate a Factor](./#tag/UserFactor/operation/activateFactor).- Parameters:
userId
- ID of an existing Okta user (required)body
- Factor (required)updatePhone
- If `true`, indicates you are replacing the currently registered phone number for the specified user. This parameter is ignored if the existing phone number is used by an activated Factor. (optional, default to false)templateId
- ID of an existing custom SMS template. See the [SMS Templates API](../Template). Only used by `sms` Factors. If the provided ID doesn't exist, the default template is used instead. (optional)tokenLifetimeSeconds
- Defines how long the token remains valid (optional, default to 300)activate
- If `true`, the `sms` Factor is immediately activated as part of the enrollment. An activation text message isn't sent to the device. (optional, default to false)acceptLanguage
- An ISO 639-1 two-letter language code that defines a localized message to send. Only used by `sms` Factors. If a localized message doesn't exist or the `templateId` is incorrect, the default template is used instead. (optional)- Returns:
- UserFactor
- Throws:
ApiException
- if fails to make API call
-
enrollFactor
public UserFactor enrollFactor(String userId, UserFactor body, Boolean updatePhone, String templateId, Integer tokenLifetimeSeconds, Boolean activate, String acceptLanguage, Map<String, String> additionalHeaders) throws ApiExceptionEnroll a Factor Enrolls a supported Factor for the specified user. Some Factor types require a seperate activation to complete the enrollment process. See [Activate a Factor](./#tag/UserFactor/operation/activateFactor).- Parameters:
userId
- ID of an existing Okta user (required)body
- Factor (required)updatePhone
- If `true`, indicates you are replacing the currently registered phone number for the specified user. This parameter is ignored if the existing phone number is used by an activated Factor. (optional, default to false)templateId
- ID of an existing custom SMS template. See the [SMS Templates API](../Template). Only used by `sms` Factors. If the provided ID doesn't exist, the default template is used instead. (optional)tokenLifetimeSeconds
- Defines how long the token remains valid (optional, default to 300)activate
- If `true`, the `sms` Factor is immediately activated as part of the enrollment. An activation text message isn't sent to the device. (optional, default to false)acceptLanguage
- An ISO 639-1 two-letter language code that defines a localized message to send. Only used by `sms` Factors. If a localized message doesn't exist or the `templateId` is incorrect, the default template is used instead. (optional)additionalHeaders
- additionalHeaders for this call- Returns:
- UserFactor
- Throws:
ApiException
- if fails to make API call
-
getFactor
Retrieve a Factor Retrieves an existing Factor for the specified user- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)- Returns:
- UserFactor
- Throws:
ApiException
- if fails to make API call
-
getFactor
public UserFactor getFactor(String userId, String factorId, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a Factor Retrieves an existing Factor for the specified user- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)additionalHeaders
- additionalHeaders for this call- Returns:
- UserFactor
- Throws:
ApiException
- if fails to make API call
-
getFactorTransactionStatus
public UserFactorPushTransaction getFactorTransactionStatus(String userId, String factorId, String transactionId) throws ApiException Retrieve a Factor transaction status Retrieves the status of a `push` Factor verification transaction- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)transactionId
- ID of an existing Factor verification transaction (required)- Returns:
- UserFactorPushTransaction
- Throws:
ApiException
- if fails to make API call
-
getFactorTransactionStatus
public UserFactorPushTransaction getFactorTransactionStatus(String userId, String factorId, String transactionId, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a Factor transaction status Retrieves the status of a `push` Factor verification transaction- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)transactionId
- ID of an existing Factor verification transaction (required)additionalHeaders
- additionalHeaders for this call- Returns:
- UserFactorPushTransaction
- Throws:
ApiException
- if fails to make API call
-
listFactors
List all enrolled Factors Lists all enrolled Factors for the specified user- Parameters:
userId
- ID of an existing Okta user (required)- Returns:
- List<UserFactor>
- Throws:
ApiException
- if fails to make API call
-
listFactors
public List<UserFactor> listFactors(String userId, Map<String, String> additionalHeaders) throws ApiExceptionList all enrolled Factors Lists all enrolled Factors for the specified user- Parameters:
userId
- ID of an existing Okta user (required)additionalHeaders
- additionalHeaders for this call- Returns:
- List<UserFactor>
- Throws:
ApiException
- if fails to make API call
-
listSupportedFactors
List all supported Factors Lists all the supported Factors that can be enrolled for the specified user- Parameters:
userId
- ID of an existing Okta user (required)- Returns:
- List<UserFactorSupported>
- Throws:
ApiException
- if fails to make API call
-
listSupportedFactors
public List<UserFactorSupported> listSupportedFactors(String userId, Map<String, String> additionalHeaders) throws ApiExceptionList all supported Factors Lists all the supported Factors that can be enrolled for the specified user- Parameters:
userId
- ID of an existing Okta user (required)additionalHeaders
- additionalHeaders for this call- Returns:
- List<UserFactorSupported>
- Throws:
ApiException
- if fails to make API call
-
listSupportedSecurityQuestions
public List<UserFactorSecurityQuestionProfile> listSupportedSecurityQuestions(String userId) throws ApiException List all supported Security Questions Lists all available Security Questions for the specified user- Parameters:
userId
- ID of an existing Okta user (required)- Returns:
- List<UserFactorSecurityQuestionProfile>
- Throws:
ApiException
- if fails to make API call
-
listSupportedSecurityQuestions
public List<UserFactorSecurityQuestionProfile> listSupportedSecurityQuestions(String userId, Map<String, String> additionalHeaders) throws ApiExceptionList all supported Security Questions Lists all available Security Questions for the specified user- Parameters:
userId
- ID of an existing Okta user (required)additionalHeaders
- additionalHeaders for this call- Returns:
- List<UserFactorSecurityQuestionProfile>
- Throws:
ApiException
- if fails to make API call
-
resendEnrollFactor
public ResendUserFactor resendEnrollFactor(String userId, String factorId, ResendUserFactor resendUserFactor, String templateId) throws ApiException Resend a Factor enrollment Resends an `sms`, `call`, or `email` factor challenge as part of an enrollment flow. For `call` and `sms` factors, Okta enforces a rate limit of one OTP challenge per device every 30 seconds. You can configure your `sms` and `call` factors to use a third-party telephony provider. See the [Telephony inline hook reference](https://developer.okta.com/docs/reference/telephony-hook/). Okta round-robins between SMS providers with every resend request to help ensure delivery of an SMS and Call OTPs across different carriers. > **Note**: Resend operations aren't allowed after a factor exceeds the activation rate limit. See [Activate a Factor](./#tag/UserFactor/operation/activateFactor).- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)resendUserFactor
- (required)templateId
- ID of an existing custom SMS template. See the [SMS Templates API](../Template). Only used by `sms` Factors. (optional)- Returns:
- ResendUserFactor
- Throws:
ApiException
- if fails to make API call
-
resendEnrollFactor
public ResendUserFactor resendEnrollFactor(String userId, String factorId, ResendUserFactor resendUserFactor, String templateId, Map<String, String> additionalHeaders) throws ApiExceptionResend a Factor enrollment Resends an `sms`, `call`, or `email` factor challenge as part of an enrollment flow. For `call` and `sms` factors, Okta enforces a rate limit of one OTP challenge per device every 30 seconds. You can configure your `sms` and `call` factors to use a third-party telephony provider. See the [Telephony inline hook reference](https://developer.okta.com/docs/reference/telephony-hook/). Okta round-robins between SMS providers with every resend request to help ensure delivery of an SMS and Call OTPs across different carriers. > **Note**: Resend operations aren't allowed after a factor exceeds the activation rate limit. See [Activate a Factor](./#tag/UserFactor/operation/activateFactor).- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)resendUserFactor
- (required)templateId
- ID of an existing custom SMS template. See the [SMS Templates API](../Template). Only used by `sms` Factors. (optional)additionalHeaders
- additionalHeaders for this call- Returns:
- ResendUserFactor
- Throws:
ApiException
- if fails to make API call
-
unenrollFactor
public void unenrollFactor(String userId, String factorId, Boolean removeRecoveryEnrollment) throws ApiException Unenroll a Factor Unenrolls an existing Factor for the specified user. This allows the user to enroll a new Factor. > **Note**: If you unenroll the `push` or the `signed_nonce` Factors, Okta also unenrolls any other `totp`, `signed_nonce`, or Okta Verify `push` Factors associated with the user.- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)removeRecoveryEnrollment
- If `true`, removes the the phone number as both a recovery method and a Factor. Only used for `sms` and `call` Factors. (optional, default to false)- Throws:
ApiException
- if fails to make API call
-
unenrollFactor
public void unenrollFactor(String userId, String factorId, Boolean removeRecoveryEnrollment, Map<String, String> additionalHeaders) throws ApiExceptionUnenroll a Factor Unenrolls an existing Factor for the specified user. This allows the user to enroll a new Factor. > **Note**: If you unenroll the `push` or the `signed_nonce` Factors, Okta also unenrolls any other `totp`, `signed_nonce`, or Okta Verify `push` Factors associated with the user.- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)removeRecoveryEnrollment
- If `true`, removes the the phone number as both a recovery method and a Factor. Only used for `sms` and `call` Factors. (optional, default to false)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
verifyFactor
public UserFactorVerifyResponse verifyFactor(String userId, String factorId, String templateId, Integer tokenLifetimeSeconds, String xForwardedFor, String userAgent, String acceptLanguage, UserFactorVerifyRequest body) throws ApiException Verify a Factor Verifies an OTP for a Factor. Some Factors (`call`, `email`, `push`, `sms`, `u2f`, and `webauthn`) must first issue a challenge before you can verify the Factor. Do this by making a request without a body. After a challenge is issued, make another request to verify the Factor. **Note**: To verify a `push` factor, use the **poll** link returned when you issue the challenge. See [Retrieve a Factor Transaction Status](/openapi/okta-management/management/tag/UserFactor/#tag/UserFactor/operation/getFactorTransactionStatus).- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)templateId
- ID of an existing custom SMS template. See the [SMS Templates API](../Template). Only used by `sms` Factors. (optional)tokenLifetimeSeconds
- Defines how long the token remains valid (optional, default to 300)xForwardedFor
- Public IP address for the user agent (optional)userAgent
- Type of user agent detected when the request is made. Required to verify `push` Factors. (optional)acceptLanguage
- An ISO 639-1 two-letter language code that defines a localized message to send. Only used by `sms` Factors. If a localized message doesn't exist or the `templateId` is incorrect, the default template is used instead. (optional)body
- Some Factors (`call`, `email`, `push`, `sms`, `u2f`, and `webauthn`) must first issue a challenge before you can verify the Factor. Do this by making a request without a body. After a challenge is issued, make another request to verify the Factor. (optional)- Returns:
- UserFactorVerifyResponse
- Throws:
ApiException
- if fails to make API call
-
verifyFactor
public UserFactorVerifyResponse verifyFactor(String userId, String factorId, String templateId, Integer tokenLifetimeSeconds, String xForwardedFor, String userAgent, String acceptLanguage, UserFactorVerifyRequest body, Map<String, String> additionalHeaders) throws ApiExceptionVerify a Factor Verifies an OTP for a Factor. Some Factors (`call`, `email`, `push`, `sms`, `u2f`, and `webauthn`) must first issue a challenge before you can verify the Factor. Do this by making a request without a body. After a challenge is issued, make another request to verify the Factor. **Note**: To verify a `push` factor, use the **poll** link returned when you issue the challenge. See [Retrieve a Factor Transaction Status](/openapi/okta-management/management/tag/UserFactor/#tag/UserFactor/operation/getFactorTransactionStatus).- Parameters:
userId
- ID of an existing Okta user (required)factorId
- ID of an existing user Factor (required)templateId
- ID of an existing custom SMS template. See the [SMS Templates API](../Template). Only used by `sms` Factors. (optional)tokenLifetimeSeconds
- Defines how long the token remains valid (optional, default to 300)xForwardedFor
- Public IP address for the user agent (optional)userAgent
- Type of user agent detected when the request is made. Required to verify `push` Factors. (optional)acceptLanguage
- An ISO 639-1 two-letter language code that defines a localized message to send. Only used by `sms` Factors. If a localized message doesn't exist or the `templateId` is incorrect, the default template is used instead. (optional)body
- Some Factors (`call`, `email`, `push`, `sms`, `u2f`, and `webauthn`) must first issue a challenge before you can verify the Factor. Do this by making a request without a body. After a challenge is issued, make another request to verify the Factor. (optional)additionalHeaders
- additionalHeaders for this call- Returns:
- UserFactorVerifyResponse
- Throws:
ApiException
- if fails to make API call
-
getObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-