1
0
mirror of https://github.com/delight-im/PHP-Auth.git synced 2025-07-31 13:20:11 +02:00

Display masked recipients for OTPs as well in tests

This commit is contained in:
Marco
2024-08-16 07:10:55 +02:00
parent ff3038386c
commit 960dc7ffdc

View File

@@ -95,10 +95,10 @@ function processRequestData(\Delight\Auth\Auth $auth) {
$secondFactorOptions[] = 'TOTP';
}
if ($e->hasSmsOption()) {
$secondFactorOptions[] = 'SMS (' . $e->getSmsRecipient() . ') with ' . $e->getSmsOtpValue();
$secondFactorOptions[] = 'SMS (' . $e->getSmsRecipient() . ' / ' . $e->getSmsRecipientMasked() . ') with ' . $e->getSmsOtpValue();
}
if ($e->hasEmailOption()) {
$secondFactorOptions[] = 'email (' . $e->getEmailRecipient() . ') with ' . $e->getEmailOtpValue();
$secondFactorOptions[] = 'email (' . $e->getEmailRecipient() . ' / ' . $e->getEmailRecipientMasked() . ') with ' . $e->getEmailOtpValue();
}
return 'second factor required: ' . \implode(' / ', $secondFactorOptions);
@@ -205,10 +205,10 @@ function processRequestData(\Delight\Auth\Auth $auth) {
$secondFactorOptions[] = 'TOTP';
}
if ($e->hasSmsOption()) {
$secondFactorOptions[] = 'SMS (' . $e->getSmsRecipient() . ') with ' . $e->getSmsOtpValue();
$secondFactorOptions[] = 'SMS (' . $e->getSmsRecipient() . ' / ' . $e->getSmsRecipientMasked() . ') with ' . $e->getSmsOtpValue();
}
if ($e->hasEmailOption()) {
$secondFactorOptions[] = 'email (' . $e->getEmailRecipient() . ') with ' . $e->getEmailOtpValue();
$secondFactorOptions[] = 'email (' . $e->getEmailRecipient() . ' / ' . $e->getEmailRecipientMasked() . ') with ' . $e->getEmailOtpValue();
}
return 'second factor required: ' . \implode(' / ', $secondFactorOptions);
@@ -335,10 +335,10 @@ function processRequestData(\Delight\Auth\Auth $auth) {
$secondFactorOptions[] = 'TOTP';
}
if ($e->hasSmsOption()) {
$secondFactorOptions[] = 'SMS (' . $e->getSmsRecipient() . ') with ' . $e->getSmsOtpValue();
$secondFactorOptions[] = 'SMS (' . $e->getSmsRecipient() . ' / ' . $e->getSmsRecipientMasked() . ') with ' . $e->getSmsOtpValue();
}
if ($e->hasEmailOption()) {
$secondFactorOptions[] = 'email (' . $e->getEmailRecipient() . ') with ' . $e->getEmailOtpValue();
$secondFactorOptions[] = 'email (' . $e->getEmailRecipient() . ' / ' . $e->getEmailRecipientMasked() . ') with ' . $e->getEmailOtpValue();
}
return 'second factor required: ' . \implode(' / ', $secondFactorOptions);