Skip to content

Commit 3f5f901

Browse files
committed
OXDEV-9078 Add code validator service draft
1 parent f9df490 commit 3f5f901

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
/**
4+
* Copyright © OXID eSales AG. All rights reserved.
5+
* See LICENSE file for license details.
6+
*/
7+
8+
declare(strict_types=1);
9+
10+
namespace OxidEsales\SecurityModule\Authentication\TwoFactorAuth\OTP\Service;
11+
12+
use OxidEsales\SecurityModule\Authentication\TwoFactorAuth\OTP\Infrastructure\Repository\OtpChallengeStateRepositoryInterface;
13+
14+
class OtpCodeValidatorService implements OtpCodeValidatorServiceInterface
15+
{
16+
public function __construct(
17+
private OtpChallengeStateRepositoryInterface $repository,
18+
) {
19+
}
20+
21+
public function validateCode(
22+
string $userId,
23+
#[\SensitiveParameter] string $inputCode
24+
): void {
25+
// todo-critical: implement
26+
}
27+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/**
4+
* Copyright © OXID eSales AG. All rights reserved.
5+
* See LICENSE file for license details.
6+
*/
7+
8+
declare(strict_types=1);
9+
10+
namespace OxidEsales\SecurityModule\Authentication\TwoFactorAuth\OTP\Service;
11+
12+
interface OtpCodeValidatorServiceInterface
13+
{
14+
public function validateCode(
15+
string $userId,
16+
#[\SensitiveParameter] string $inputCode
17+
): void;
18+
}

0 commit comments

Comments
 (0)