PhilipBrown\Signature\Guards\CheckSignature::check PHP Method

check() public method

Check to ensure the auth parameters satisfy the rule of the guard
public check ( array $auth, array $signature, string $prefix ) : boolean
$auth array
$signature array
$prefix string
return boolean
    public function check(array $auth, array $signature, $prefix)
    {
        if (!isset($auth[$prefix . 'signature'])) {
            throw new SignatureSignatureException('The signature has not been set');
        }
        if ($auth[$prefix . 'signature'] !== $signature[$prefix . 'signature']) {
            throw new SignatureSignatureException('The signature is not valid');
        }
        return true;
    }
CheckSignature