public function verify($key, $algo = null)
{
if (empty($key) || $algo && $this->header['alg'] !== $algo) {
return false;
}
$decodedSignature = $this->encoder->decode($this->getEncodedSignature());
$signinInput = $this->generateSigninInput();
return $this->getSigner()->verify($key, $decodedSignature, $signinInput);
}