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-03-29T16:47:02.065887-05:00[America/Chicago]",
comments="Generator version: 7.4.0")
public class UserFactorApi
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactivateFactor
(String userId, String factorId, ActivateFactorRequest body) Activate a Factor Activates a factor.activateFactor
(String userId, String factorId, ActivateFactorRequest body, Map<String, String> additionalHeaders) Activate a Factor Activates a factor.enrollFactor
(String userId, UserFactor body, Boolean updatePhone, String templateId, Integer tokenLifetimeSeconds, Boolean activate) Enroll a Factor Enrolls a user with a supported factorenrollFactor
(String userId, UserFactor body, Boolean updatePhone, String templateId, Integer tokenLifetimeSeconds, Boolean activate, Map<String, String> additionalHeaders) Enroll a Factor Enrolls a user with a supported factorRetrieve a Factor Retrieves a factor for the specified userRetrieve a Factor Retrieves a factor for the specified usergetFactorTransactionStatus
(String userId, String factorId, String transactionId) Retrieve a Factor Transaction Status Retrieves the factors verification transaction statusgetFactorTransactionStatus
(String userId, String factorId, String transactionId, Map<String, String> additionalHeaders) Retrieve a Factor Transaction Status Retrieves the factors verification transaction statusprotected static com.fasterxml.jackson.databind.ObjectMapper
listFactors
(String userId) List all Factors Lists all the enrolled factors for the specified userlistFactors
(String userId, Map<String, String> additionalHeaders) List all Factors Lists all the 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 a user's `question` factorlistSupportedSecurityQuestions
(String userId, Map<String, String> additionalHeaders) List all Supported Security Questions Lists all available security questions for a user's `question` factorresendEnrollFactor
(String userId, String factorId, UserFactor userFactor, String templateId) Resend a factor enrollment Resends a factor challenge (SMS/call/email OTP) as part of an enrollment flow.resendEnrollFactor
(String userId, String factorId, UserFactor userFactor, String templateId, Map<String, String> additionalHeaders) Resend a factor enrollment Resends a factor challenge (SMS/call/email OTP) 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, allowing the user to enroll a new factorvoid
unenrollFactor
(String userId, String factorId, Boolean removeRecoveryEnrollment, Map<String, String> additionalHeaders) Unenroll a Factor Unenrolls an existing factor for the specified user, allowing the user to enroll a new factorverifyFactor
(String userId, String factorId, String templateId, Integer tokenLifetimeSeconds, String xForwardedFor, String userAgent, String acceptLanguage, VerifyFactorRequest body) Verify an MFA Factor Verifies an OTP for a `token` or `token:hardware` factorverifyFactor
(String userId, String factorId, String templateId, Integer tokenLifetimeSeconds, String xForwardedFor, String userAgent, String acceptLanguage, VerifyFactorRequest body, Map<String, String> additionalHeaders) Verify an MFA Factor Verifies an OTP for a `token` or `token:hardware` factor
-
Constructor Details
-
UserFactorApi
public UserFactorApi() -
UserFactorApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
activateFactor
public UserFactor activateFactor(String userId, String factorId, ActivateFactorRequest body) throws ApiException Activate a Factor Activates a factor. The `sms` and `token:software:totp` factor types require activation to complete the enrollment process.- Parameters:
userId
- (required)factorId
- `id` of the Factor (required)body
- (optional)- Returns:
- UserFactor
- Throws:
ApiException
- if fails to make API call
-
activateFactor
public UserFactor activateFactor(String userId, String factorId, ActivateFactorRequest body, Map<String, String> additionalHeaders) throws ApiExceptionActivate a Factor Activates a factor. The `sms` and `token:software:totp` factor types require activation to complete the enrollment process.- Parameters:
userId
- (required)factorId
- `id` of the 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) throws ApiException Enroll a Factor Enrolls a user with a supported factor- Parameters:
userId
- (required)body
- Factor (required)updatePhone
- (optional, default to false)templateId
- id of SMS template (only for SMS factor) (optional)tokenLifetimeSeconds
- (optional, default to 300)activate
- (optional, default to false)- 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, Map<String, String> additionalHeaders) throws ApiExceptionEnroll a Factor Enrolls a user with a supported factor- Parameters:
userId
- (required)body
- Factor (required)updatePhone
- (optional, default to false)templateId
- id of SMS template (only for SMS factor) (optional)tokenLifetimeSeconds
- (optional, default to 300)activate
- (optional, default to false)additionalHeaders
- additionalHeaders for this call- Returns:
- UserFactor
- Throws:
ApiException
- if fails to make API call
-
getFactor
Retrieve a Factor Retrieves a factor for the specified user- Parameters:
userId
- (required)factorId
- `id` of the 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 a factor for the specified user- Parameters:
userId
- (required)factorId
- `id` of the Factor (required)additionalHeaders
- additionalHeaders for this call- Returns:
- UserFactor
- Throws:
ApiException
- if fails to make API call
-
getFactorTransactionStatus
public VerifyUserFactorResponse getFactorTransactionStatus(String userId, String factorId, String transactionId) throws ApiException Retrieve a Factor Transaction Status Retrieves the factors verification transaction status- Parameters:
userId
- (required)factorId
- `id` of the Factor (required)transactionId
- `id` of the Transaction (required)- Returns:
- VerifyUserFactorResponse
- Throws:
ApiException
- if fails to make API call
-
getFactorTransactionStatus
public VerifyUserFactorResponse getFactorTransactionStatus(String userId, String factorId, String transactionId, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a Factor Transaction Status Retrieves the factors verification transaction status- Parameters:
userId
- (required)factorId
- `id` of the Factor (required)transactionId
- `id` of the Transaction (required)additionalHeaders
- additionalHeaders for this call- Returns:
- VerifyUserFactorResponse
- Throws:
ApiException
- if fails to make API call
-
listFactors
List all Factors Lists all the enrolled factors for the specified user- Parameters:
userId
- (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 Factors Lists all the enrolled factors for the specified user- Parameters:
userId
- (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
- (required)- Returns:
- List<UserFactor>
- Throws:
ApiException
- if fails to make API call
-
listSupportedFactors
public List<UserFactor> 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
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- List<UserFactor>
- Throws:
ApiException
- if fails to make API call
-
listSupportedSecurityQuestions
List all Supported Security Questions Lists all available security questions for a user's `question` factor- Parameters:
userId
- (required)- Returns:
- List<SecurityQuestion>
- Throws:
ApiException
- if fails to make API call
-
listSupportedSecurityQuestions
public List<SecurityQuestion> listSupportedSecurityQuestions(String userId, Map<String, String> additionalHeaders) throws ApiExceptionList all Supported Security Questions Lists all available security questions for a user's `question` factor- Parameters:
userId
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- List<SecurityQuestion>
- Throws:
ApiException
- if fails to make API call
-
resendEnrollFactor
public UserFactor resendEnrollFactor(String userId, String factorId, UserFactor userFactor, String templateId) throws ApiException Resend a factor enrollment Resends a factor challenge (SMS/call/email OTP) as part of an enrollment flow. The current rate limit is one OTP challenge (call or SMS) per device every 30 seconds. Okta round-robins between SMS providers with every resend request to help ensure delivery of an SMS OTP across different carriers.- Parameters:
userId
- (required)factorId
- `id` of the Factor (required)userFactor
- Factor (required)templateId
- ID of SMS template (only for SMS factor) (optional)- Returns:
- UserFactor
- Throws:
ApiException
- if fails to make API call
-
resendEnrollFactor
public UserFactor resendEnrollFactor(String userId, String factorId, UserFactor userFactor, String templateId, Map<String, String> additionalHeaders) throws ApiExceptionResend a factor enrollment Resends a factor challenge (SMS/call/email OTP) as part of an enrollment flow. The current rate limit is one OTP challenge (call or SMS) per device every 30 seconds. Okta round-robins between SMS providers with every resend request to help ensure delivery of an SMS OTP across different carriers.- Parameters:
userId
- (required)factorId
- `id` of the Factor (required)userFactor
- Factor (required)templateId
- ID of SMS template (only for SMS factor) (optional)additionalHeaders
- additionalHeaders for this call- Returns:
- UserFactor
- 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, allowing the user to enroll a new factor- Parameters:
userId
- (required)factorId
- `id` of the Factor (required)removeRecoveryEnrollment
- (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, allowing the user to enroll a new factor- Parameters:
userId
- (required)factorId
- `id` of the Factor (required)removeRecoveryEnrollment
- (optional, default to false)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
verifyFactor
public VerifyUserFactorResponse verifyFactor(String userId, String factorId, String templateId, Integer tokenLifetimeSeconds, String xForwardedFor, String userAgent, String acceptLanguage, VerifyFactorRequest body) throws ApiException Verify an MFA Factor Verifies an OTP for a `token` or `token:hardware` factor- Parameters:
userId
- (required)factorId
- `id` of the Factor (required)templateId
- (optional)tokenLifetimeSeconds
- (optional, default to 300)xForwardedFor
- (optional)userAgent
- (optional)acceptLanguage
- (optional)body
- (optional)- Returns:
- VerifyUserFactorResponse
- Throws:
ApiException
- if fails to make API call
-
verifyFactor
public VerifyUserFactorResponse verifyFactor(String userId, String factorId, String templateId, Integer tokenLifetimeSeconds, String xForwardedFor, String userAgent, String acceptLanguage, VerifyFactorRequest body, Map<String, String> additionalHeaders) throws ApiExceptionVerify an MFA Factor Verifies an OTP for a `token` or `token:hardware` factor- Parameters:
userId
- (required)factorId
- `id` of the Factor (required)templateId
- (optional)tokenLifetimeSeconds
- (optional, default to 300)xForwardedFor
- (optional)userAgent
- (optional)acceptLanguage
- (optional)body
- (optional)additionalHeaders
- additionalHeaders for this call- Returns:
- VerifyUserFactorResponse
- Throws:
ApiException
- if fails to make API call
-
getObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-