public function isValid(string $key) : bool
    {
        if (!$this->headers->has($this->algorithmHeader)) {
            return false;
        }

        if (!$this->headers->has($this->signatureHeader)) {
            return false;
        }

        $signature = new Signature(new Payload($this->request), $this->getAlgorithm(), $key);

        return $signature->equals($this->getSignature());
    }
public function isValid(string $key) : bool
    {
        if (!$this->headers->has($this->algorithmHeader)) {
            return false;
        }

        if (!$this->headers->has($this->signatureHeader)) {
            return false;
        }

        $signature = new Signature(new Payload($this->request), $this->getAlgorithm(), $key);

        return $signature->equals($this->getSignature());
    }
public function isValid ( string $ key ) : bool { if ( ! $ this -> headers -> has ( $ this -> algorithmHeader ) ) { return false ; } if ( ! $ this -> headers -> has ( $ this -> signatureHeader ) ) { return false ; } $ signature = new Signature ( new Payload ( $ this -> request ) , $ this -> getAlgorithm ( ) , $ key ) ; return $ signature -> equals ( $ this -> getSignature ( ) ) ; }
Determines if the signed request is valid.

@param string $key
The key to validate the signature with.

@return bool
true if the signature matches the computed signature, false
otherwise.
Determines if the signed request is valid .