Skip to content

Commit ec80222

Browse files
committed
OXDEV-9078 Rename hasPendingChallenge to isVerified for more clear workflow
1 parent ed22336 commit ec80222

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Authentication/TwoFactorAuth/OTP/OTPService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class OTPService implements TwoFAServiceInterface
1515
{
16-
public function hasPendingChallenge(string $userId): bool
16+
public function isVerified(string $userId): bool
1717
{
1818
}
1919

src/Authentication/TwoFactorAuth/Service/TwoFAServiceInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
interface TwoFAServiceInterface
1111
{
12-
public function hasPendingChallenge(string $userId): bool;
12+
public function isVerified(string $userId): bool;
1313

1414
public function triggerChallenge(string $userId): void;
1515

src/Shared/Model/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected function onLogin($userName, #[\SensitiveParameter] $password)
112112
// $settingsService = $this->getService(TwoFASettingsServiceInterface::class);
113113
// if ($settingsService->isTwoFactorAuthEnabled() && !$this->isAdmin()) {
114114
// $authentication = $this->getService(TwoFAServiceInterface::class);
115-
// if ($authentication->hasPendingChallenge($userId)) {
115+
// if (!$authentication->isVerified($userId)) {
116116
// $authentication->triggerChallenge($userId);
117117
// }
118118
// }

0 commit comments

Comments
 (0)