| 1 | <?php | ||
| 21 | final class CallableChecker implements ClaimChecker, HeaderChecker | ||
| 22 | { | ||
| 23 | /** | ||
| 24 | * @var string | ||
| 25 | */ | ||
| 26 | private $key; | ||
| 27 | |||
| 28 | /** | ||
| 29 | * @var callable | ||
| 30 | */ | ||
| 31 | private $callable; | ||
| 32 | |||
| 33 | public function __construct(string $key, callable $callable) | ||
| 38 | |||
| 39 | /** | ||
| 40 | * @param mixed $value | ||
| 41 | * | ||
| 42 | * @throws InvalidClaimException if the claim is invalid | ||
| 43 | */ | ||
| 44 | public function checkClaim($value): void | ||
| 52 | |||
| 53 | public function supportedClaim(): string | ||
| 57 | |||
| 58 | /** | ||
| 59 |      * {@inheritdoc} | ||
| 60 | */ | ||
| 61 | public function checkHeader($value): void | ||
| 69 | |||
| 70 | public function supportedHeader(): string | ||
| 74 | |||
| 75 | public function protectedHeaderOnly(): bool | ||
| 79 | } | ||
| 80 |