Class MFAController
- java.lang.Object
-
- com.bandwidth.controllers.BaseController
-
- com.bandwidth.multifactorauth.controllers.MFAController
-
public final class MFAController extends BaseController
This class lists all the endpoints of the groups.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.bandwidth.controllers.BaseController
BaseController.RequestExecutor, BaseController.RequestSupplier, BaseController.ResponseHandler<T>
-
-
Field Summary
-
Fields inherited from class com.bandwidth.controllers.BaseController
authManagers, config, httpCallback, userAgent
-
-
Constructor Summary
Constructors Constructor Description MFAController(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers)
Initializes the controller.MFAController(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers, HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
-
Method Summary
-
Methods inherited from class com.bandwidth.controllers.BaseController
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponse
-
-
-
-
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 enabledbody
- 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 enabledbody
- 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 enabledbody
- 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 enabledbody
- Required parameter: Example:- Returns:
- Returns the TwoFactorMessagingResponse wrapped in ApiResponse response from the API call
-
createVerifyTwoFactor
public ApiResponse<TwoFactorVerifyCodeResponse> createVerifyTwoFactor(String accountId, TwoFactorVerifyRequestSchema body) throws ApiException, IOException
Allows a user to verify an MFA code.- Parameters:
accountId
- Required parameter: Bandwidth Account ID with Two-Factor enabledbody
- Required parameter: Example:- Returns:
- Returns the TwoFactorVerifyCodeResponse 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.
-
createVerifyTwoFactorAsync
public CompletableFuture<ApiResponse<TwoFactorVerifyCodeResponse>> createVerifyTwoFactorAsync(String accountId, TwoFactorVerifyRequestSchema body)
Allows a user to verify an MFA code.- Parameters:
accountId
- Required parameter: Bandwidth Account ID with Two-Factor enabledbody
- Required parameter: Example:- Returns:
- Returns the TwoFactorVerifyCodeResponse wrapped in ApiResponse response from the API call
-
-