Class UserFactorApi

java.lang.Object
com.okta.sdk.resource.api.UserFactorApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-03-29T16:46:27.777599-05:00[America/Chicago]", comments="Generator version: 7.4.0") public class UserFactorApi extends Object
  • Constructor Details

    • UserFactorApi

      public UserFactorApi()
    • UserFactorApi

      public UserFactorApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • 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 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)
      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 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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      UserFactor
      Throws:
      ApiException - if fails to make API call
    • getFactor

      public UserFactor getFactor(String userId, String factorId) throws ApiException
      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 ApiException
      Retrieve 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 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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      VerifyUserFactorResponse
      Throws:
      ApiException - if fails to make API call
    • listFactors

      public List<UserFactor> listFactors(String userId) throws ApiException
      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 ApiException
      List 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

      public List<UserFactor> listSupportedFactors(String userId) throws ApiException
      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 ApiException
      List 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

      public List<SecurityQuestion> listSupportedSecurityQuestions(String userId) throws ApiException
      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 ApiException
      List 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 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)
      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 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)
      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 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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      VerifyUserFactorResponse
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()