Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

361
Views
Can't make a custom Signature validator class [Laravel 8 Spatie Webhook Client]

I am a beginner and I'm trying to make a custom signature validator class and following the Spatie documentation I made the file CustomSignatureValidator.php which implements Spatie\WebhookClient\SignatureValidator\SignatureValidator but I'm getting the following error:

App/Handler/CustomSignatureValidator is not a valid signature validation class. A valid signature validator is a class that implements Spatie\WebhookClient\SignatureValidator\SignatureValidator

This is how it looks like:

 <?php
    
    namespace App\Handler\CustomSignatureValidator;
    
    use Illuminate\Http\Request;
    use Spatie\WebhookClient\Exceptions\WebhookFailed;
    use Spatie\WebhookClient\WebhookConfig;
    use Spatie\WebhookClient\SignatureValidator\SignatureValidator;
    
    class CustomSignatureValidator implements SignatureValidator
    {
        public function isValid(Request $request, WebhookConfig $config): bool
        {
            return true;
        }
    }

I've also tried using

use Spatie\WebhookClient\SignatureValidator\SignatureValidator as SignatureValidator;

But i am also getting the same error.

If you could tell me what am i doing wrong i would really appreciate it.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I think you've got one too many CustomSignatureValidator. Your namespace is App\Handler\CustomSignatureValidator, which means your class will be App\Handler\CustomSignatureValidator\CustomSignatureValidator.

I'm guessing the error isn't because your class is not implementing the right interface, but that it can't be found by the autoloader.

Try removing CustomSignatureValidator from your namespace, which will cause your class to become App\Handler\CustomSignatureValidator, which Laravel should be able to find.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!