Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend InvalidWebhookSignatureEvent with WebhookConfig parameter #214

Merged
merged 2 commits into from
May 21, 2024

Conversation

jansgescheit
Copy link
Contributor

If the application connects several webhook clients, it is now easy to find out which webhook it is. This allows errors to be dealt with individually.

In our specific example, the external webhook service cannot correctly calculate the signature with a UTF8 payload, so that we can call the GET API of the external service in the event of an error.

e.g.

    public function handle(InvalidWebhookSignatureEvent $event): void
    {
        if ($event->config->processWebhookJobClass !== CustomWebhookJob::class) {
            return;
        }

        // do something specific 
    }

@freekmurze freekmurze merged commit 14c7f77 into spatie:main May 21, 2024
16 checks passed
@freekmurze
Copy link
Member

Thanks!

@joelclermont
Copy link

Love the change, but isn't this an API break? Thankfully my tests/static analysis caught it in my app, but was a bit of a surprise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants