public verifyWithKeySet ( Jose\Object\JWSInterface $jws, Jose\Object\JWKSetInterface $jwk_set, null | string $detached_payload = null, null | integer &$signature_index = null ) | ||
$jws | Jose\Object\JWSInterface | A JWS object. |
$jwk_set | Jose\Object\JWKSetInterface | The signature will be verified using keys in the key set |
$detached_payload | null | string | If not null, the value must be the detached payload encoded in Base64 URL safe. If the input contains a payload, throws an exception. |
$signature_index | null | integer | If the JWS has been verified, an integer that represents the ID of the signature is set |
public function verifyWithKeySet(Object\JWSInterface $jws, Object\JWKSetInterface $jwk_set, $detached_payload = null, &$signature_index = null);
/** * {@inheritdoc} */ public function verify(Object\JWSInterface $jws, Object\JWKSetInterface $signature_key_set, $detached_payload = null) { Assertion::inArray($jws->getSignature(0)->getProtectedHeader('alg'), $this->getSupportedSignatureAlgorithms(), sprintf('The signature algorithm "%s" is not supported or not allowed.', $jws->getSignature(0)->getProtectedHeader('alg'))); $index = null; $this->verifier->verifyWithKeySet($jws, $signature_key_set, $detached_payload, $index); Assertion::notNull($index, 'JWS signature(s) verification failed.'); $this->checker_manager->checkJWS($jws, $index); return $index; }