Class MFAController

java.lang.Object
com.bandwidth.controllers.BaseController
com.bandwidth.twofactorauth.controllers.MFAController

public final class MFAController
extends BaseController
This class lists all the endpoints of the groups.
  • Constructor Details

    • MFAController

      public MFAController​(Configuration config, HttpClient httpClient, java.util.Map<java.lang.String,​AuthManager> authManagers)
      Initializes the controller.
      Parameters:
      config - Configurations added in client.
      httpClient - Send HTTP requests and read the responses.
      authManagers - Apply authorization to requests.
    • MFAController

      public MFAController​(Configuration config, HttpClient httpClient, java.util.Map<java.lang.String,​AuthManager> authManagers, HttpCallback httpCallback)
      Initializes the controller with HTTPCallback.
      Parameters:
      config - Configurations added in client.
      httpClient - Send HTTP requests and read the responses.
      authManagers - Apply authorization to requests.
      httpCallback - Callback to be called before and after the HTTP call.
  • Method Details

    • createVoiceTwoFactor

      public ApiResponse<TwoFactorVoiceResponse> createVoiceTwoFactor​(java.lang.String accountId, TwoFactorCodeRequestSchema body) throws ApiException, java.io.IOException
      Allows a user to send a MFA code through a phone call.
      Parameters:
      accountId - Required parameter: Bandwidth Account ID with Voice service enabled
      body - Required parameter: Example:
      Returns:
      Returns the TwoFactorVoiceResponse wrapped in ApiResponse response from the API call
      Throws:
      ApiException - Represents error response from the server.
      java.io.IOException - Signals that an I/O exception of some sort has occurred.
    • createVoiceTwoFactorAsync

      public java.util.concurrent.CompletableFuture<ApiResponse<TwoFactorVoiceResponse>> createVoiceTwoFactorAsync​(java.lang.String accountId, TwoFactorCodeRequestSchema body)
      Allows a user to send a MFA code through a phone call.
      Parameters:
      accountId - Required parameter: Bandwidth Account ID with Voice service enabled
      body - Required parameter: Example:
      Returns:
      Returns the TwoFactorVoiceResponse wrapped in ApiResponse response from the API call
    • createMessagingTwoFactor

      public ApiResponse<TwoFactorMessagingResponse> createMessagingTwoFactor​(java.lang.String accountId, TwoFactorCodeRequestSchema body) throws ApiException, java.io.IOException
      Allows a user to send a MFA code through a text message (SMS).
      Parameters:
      accountId - Required parameter: Bandwidth Account ID with Messaging service enabled
      body - Required parameter: Example:
      Returns:
      Returns the TwoFactorMessagingResponse wrapped in ApiResponse response from the API call
      Throws:
      ApiException - Represents error response from the server.
      java.io.IOException - Signals that an I/O exception of some sort has occurred.
    • createMessagingTwoFactorAsync

      public java.util.concurrent.CompletableFuture<ApiResponse<TwoFactorMessagingResponse>> createMessagingTwoFactorAsync​(java.lang.String accountId, TwoFactorCodeRequestSchema body)
      Allows a user to send a MFA code through a text message (SMS).
      Parameters:
      accountId - Required parameter: Bandwidth Account ID with Messaging service enabled
      body - Required parameter: Example:
      Returns:
      Returns the TwoFactorMessagingResponse wrapped in ApiResponse response from the API call
    • createVerifyTwoFactor

      public ApiResponse<TwoFactorVerifyCodeResponse> createVerifyTwoFactor​(java.lang.String accountId, TwoFactorVerifyRequestSchema body) throws ApiException, java.io.IOException
      Allows a user to verify an MFA code.
      Parameters:
      accountId - Required parameter: Bandwidth Account ID with Two-Factor enabled
      body - Required parameter: Example:
      Returns:
      Returns the TwoFactorVerifyCodeResponse wrapped in ApiResponse response from the API call
      Throws:
      ApiException - Represents error response from the server.
      java.io.IOException - Signals that an I/O exception of some sort has occurred.
    • createVerifyTwoFactorAsync

      public java.util.concurrent.CompletableFuture<ApiResponse<TwoFactorVerifyCodeResponse>> createVerifyTwoFactorAsync​(java.lang.String accountId, TwoFactorVerifyRequestSchema body)
      Allows a user to verify an MFA code.
      Parameters:
      accountId - Required parameter: Bandwidth Account ID with Two-Factor enabled
      body - Required parameter: Example:
      Returns:
      Returns the TwoFactorVerifyCodeResponse wrapped in ApiResponse response from the API call