1 | <?php |
||
20 | final class IssuerChecker implements ClaimChecker, HeaderChecker |
||
21 | { |
||
22 | private const CLAIM_NAME = 'iss'; |
||
23 | |||
24 | /** |
||
25 | * @var bool |
||
26 | */ |
||
27 | private $protectedHeader = false; |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | private $issuers; |
||
33 | |||
34 | public function __construct(array $issuer, bool $protectedHeader = false) |
||
39 | |||
40 | /** |
||
41 | * @param mixed $value |
||
42 | * |
||
43 | * @throws InvalidClaimException if the claim is invalid |
||
44 | */ |
||
45 | public function checkClaim($value): void |
||
49 | |||
50 | /** |
||
51 | * @param mixed $value |
||
52 | * |
||
53 | * @throws InvalidHeaderException if the header parameter is invalid |
||
54 | */ |
||
55 | public function checkHeader($value): void |
||
59 | |||
60 | public function supportedClaim(): string |
||
64 | |||
65 | public function supportedHeader(): string |
||
69 | |||
70 | public function protectedHeaderOnly(): bool |
||
74 | |||
75 | /** |
||
76 | * @param mixed $value |
||
77 | * |
||
78 | * @throws InvalidClaimException if the claim is invalid |
||
79 | * @throws InvalidHeaderException if the header parameter is invalid |
||
80 | */ |
||
81 | private function checkValue($value, string $class): void |
||
90 | } |
||
91 |