1 | <?php |
||
20 | final class AudienceChecker implements ClaimCheckerInterface |
||
21 | { |
||
22 | private const CLAIM_NAME = 'aud'; |
||
23 | |||
24 | /** |
||
25 | * @var bool |
||
26 | */ |
||
27 | private $protectedHeader = false; |
||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $audience; |
||
32 | |||
33 | /** |
||
34 | * AudienceChecker constructor. |
||
35 | * |
||
36 | * @param RouterInterface $router |
||
37 | * @param string $routeName |
||
38 | * @param array $routeParameters |
||
39 | */ |
||
40 | public function __construct(RouterInterface $router, string $routeName, array $routeParameters) |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function checkClaim($value) |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function checkHeader($value) |
||
60 | |||
61 | /** |
||
62 | * @param $value |
||
63 | * |
||
64 | * @throws \InvalidArgumentException |
||
65 | */ |
||
66 | private function checkValue($value) |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function supportedClaim(): string |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function supportedHeader(): string |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function protectedHeaderOnly(): bool |
||
98 | } |
||
99 |