Jose\Loader::loadAndVerifySignature PHP Method

loadAndVerifySignature() private method

private loadAndVerifySignature ( string $input, Jose\Object\JWKSetInterface $jwk_set, array $allowed_algorithms, string | null $detached_payload = null, null | integer &$signature_index = null ) : Jose\Object\JWSInterface
$input string
$jwk_set Jose\Object\JWKSetInterface
$allowed_algorithms array
$detached_payload string | null
$signature_index null | integer
return Jose\Object\JWSInterface
    private function loadAndVerifySignature($input, Object\JWKSetInterface $jwk_set, array $allowed_algorithms, $detached_payload = null, &$signature_index = null)
    {
        $jwt = $this->load($input);
        Assertion::isInstanceOf($jwt, Object\JWSInterface::class, 'The input is not a valid JWS.');
        $verifier = Verifier::createVerifier($allowed_algorithms);
        $verifier->verifyWithKeySet($jwt, $jwk_set, $detached_payload, $signature_index);
        return $jwt;
    }