| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Webauthn\MetadataService\Statement; |
| 6 |
|
| 7 |
use Webauthn\Exception\MetadataStatementLoadingException; |
| 8 |
|
| 9 |
abstract class AbstractDescriptor |
| 10 |
{ |
| 11 |
public function __construct( |
| 12 |
public readonly ?int $maxRetries = null, |
| 13 |
public readonly ?int $blockSlowdown = null |
| 14 |
) { |
| 15 |
$maxRetries >= 0 || throw MetadataStatementLoadingException::create( |
| 16 |
'Invalid data. The value of "maxRetries" must be a positive integer' |
| 17 |
); |
| 18 |
$blockSlowdown >= 0 || throw MetadataStatementLoadingException::create( |
| 19 |
'Invalid data. The value of "blockSlowdown" must be a positive integer' |
| 20 |
); |
| 21 |
} |
| 22 |
} |