Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function __construct(JwtConfiguration $config, Clock $clock, array $issuers = null, string $audience = null) |
||
27 | { |
||
28 | $this->config = $config; |
||
29 | |||
30 | $this |
||
31 | ->addConstraint(new Constraint\ValidAt($clock)) |
||
32 | ->addConstraint(new Constraint\SignedWith($this->config->getSigner(), $this->config->getVerificationKey())) |
||
33 | ; |
||
34 | |||
35 | if ($issuers) { |
||
36 | $this->addConstraint(new Constraint\IssuedBy(...$issuers)); |
||
37 | } |
||
38 | |||
39 | if ($audience) { |
||
40 | $this->addConstraint(new Constraint\PermittedFor($audience)); |
||
41 | } |
||
66 |