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.
-
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, java.util.Map<java.lang.String,AuthManager> authManagers)
Initializes the controller.MFAController(Configuration config, HttpClient httpClient, java.util.Map<java.lang.String,AuthManager> authManagers, HttpCallback httpCallback)
Initializes the controller with HTTPCallback. -
Method Summary
Modifier and Type Method Description ApiResponse<TwoFactorMessagingResponse>
createMessagingTwoFactor(java.lang.String accountId, TwoFactorCodeRequestSchema body)
Allows a user to send a MFA code through a text message (SMS).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).ApiResponse<TwoFactorVerifyCodeResponse>
createVerifyTwoFactor(java.lang.String accountId, TwoFactorVerifyRequestSchema body)
Allows a user to verify an MFA code.java.util.concurrent.CompletableFuture<ApiResponse<TwoFactorVerifyCodeResponse>>
createVerifyTwoFactorAsync(java.lang.String accountId, TwoFactorVerifyRequestSchema body)
Allows a user to verify an MFA code.ApiResponse<TwoFactorVoiceResponse>
createVoiceTwoFactor(java.lang.String accountId, TwoFactorCodeRequestSchema body)
Allows a user to send a MFA code through a phone call.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.Methods inherited from class com.bandwidth.controllers.BaseController
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponse
-
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.IOExceptionAllows 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.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 enabledbody
- 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.IOExceptionAllows 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.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 enabledbody
- 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.IOExceptionAllows 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.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 enabledbody
- Required parameter: Example:- Returns:
- Returns the TwoFactorVerifyCodeResponse wrapped in ApiResponse response from the API call
-