All URIs are relative to https://box.example.com/admin
Method | HTTP request | Description |
---|---|---|
mfaStatus | POST /mfa/status | Retrieve MFA status for you or another user |
mfaTotpDisable | POST /mfa/disable | Disable multi-factor authentication for you or another user |
mfaTotpEnable | POST /mfa/totp/enable | Enable TOTP authentication |
\MailInABoxAPI\Client\Model\MfaStatusResponse mfaStatus()
Retrieve MFA status for you or another user
Retrieves which type of MFA is used and configuration
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MailInABoxAPI\Client\Api\MFAApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->mfaStatus();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MFAApi->mfaStatus: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\MailInABoxAPI\Client\Model\MfaStatusResponse
- Content-Type: Not defined
- Accept: application/json, text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string mfaTotpDisable($mfaId)
Disable multi-factor authentication for you or another user
Disables multi-factor authentication for the currently logged-in admin user or another user if a 'user' parameter is submitted. Either disables all multi-factor authentication methods or the method corresponding to the optional property mfa_id
.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MailInABoxAPI\Client\Api\MFAApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$mfaId = 'mfaId_example'; // string |
try {
$result = $apiInstance->mfaTotpDisable($mfaId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MFAApi->mfaTotpDisable: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
mfaId | string | [optional] |
string
- Content-Type: application/x-www-form-urlencoded
- Accept: text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string mfaTotpEnable($secret, $code, $label)
Enable TOTP authentication
Enables TOTP authentication for the currently logged-in admin user
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MailInABoxAPI\Client\Api\MFAApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$secret = 'secret_example'; // string |
$code = 'code_example'; // string |
$label = 'label_example'; // string |
try {
$result = $apiInstance->mfaTotpEnable($secret, $code, $label);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MFAApi->mfaTotpEnable: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
secret | string | ||
code | string | ||
label | string | [optional] |
string
- Content-Type: application/x-www-form-urlencoded
- Accept: text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]