Class MFAController


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

      • MFAController

        public MFAController​(Configuration config,
                             HttpClient httpClient,
                             Map<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,
                             Map<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 Detail

      • createVoiceTwoFactor

        public ApiResponse<TwoFactorVoiceResponse> createVoiceTwoFactor​(String accountId,
                                                                        TwoFactorCodeRequestSchema body)
                                                                 throws ApiException,
                                                                        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.
        IOException - Signals that an I/O exception of some sort has occurred.
      • createVoiceTwoFactorAsync

        public CompletableFuture<ApiResponse<TwoFactorVoiceResponse>> createVoiceTwoFactorAsync​(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​(String accountId,
                                                                                TwoFactorCodeRequestSchema body)
                                                                         throws ApiException,
                                                                                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.
        IOException - Signals that an I/O exception of some sort has occurred.
      • createMessagingTwoFactorAsync

        public CompletableFuture<ApiResponse<TwoFactorMessagingResponse>> createMessagingTwoFactorAsync​(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