From 960dc7ffdcc16f3d8bcf3df2ef7181e30dab0ad3 Mon Sep 17 00:00:00 2001 From: Marco Date: Fri, 16 Aug 2024 07:10:55 +0200 Subject: [PATCH] Display masked recipients for OTPs as well in tests --- tests/index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/index.php b/tests/index.php index e4823f7..e9f90b9 100644 --- a/tests/index.php +++ b/tests/index.php @@ -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);