/home/techb158/dev.balacoffee.com/vendor/lcobucci/jwt/src/Validation/Constraint
Edit: /home/techb158/dev.balacoffee.com/vendor/lcobucci/jwt/src/Validation/Constraint/SignedWith.php (996B)
signer = $signer;
$this->key = $key;
}
public function assert(Token $token): void
{
if (! $token instanceof Token\Plain) {
throw new ConstraintViolation('You should pass a plain token');
}
if ($token->headers()->get('alg') !== $this->signer->algorithmId()) {
throw new ConstraintViolation('Token signer mismatch');
}
if (! $this->signer->verify($token->signature()->hash(), $token->payload(), $this->key)) {
throw new ConstraintViolation('Token signature mismatch');
}
}
}