| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Webauthn\AuthenticationExtensions; |
| 6 |
|
| 7 |
class ExtensionOutputCheckerHandler |
| 8 |
{ |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
private array $checkers = []; |
| 13 |
|
| 14 |
public static function create(): self |
| 15 |
{ |
| 16 |
return new self(); |
| 17 |
} |
| 18 |
|
| 19 |
public function add(ExtensionOutputChecker $checker): void |
| 20 |
{ |
| 21 |
$this->checkers[] = $checker; |
| 22 |
} |
| 23 |
|
| 24 |
public function check(AuthenticationExtensions $inputs, AuthenticationExtensions $outputs): void |
| 25 |
{ |
| 26 |
foreach ($this->checkers as $checker) { |
| 27 |
$checker->check($inputs, $outputs); |
| 28 |
} |
| 29 |
} |
| 30 |
} |