Skip to content

feat(receivers): add invalidRequestSignatureHandler to HTTP/Express receivers#2937

Open
singhvishalkr wants to merge 1 commit into
slackapi:mainfrom
singhvishalkr:feat/invalid-request-signature-handler
Open

feat(receivers): add invalidRequestSignatureHandler to HTTP/Express receivers#2937
singhvishalkr wants to merge 1 commit into
slackapi:mainfrom
singhvishalkr:feat/invalid-request-signature-handler

Conversation

@singhvishalkr
Copy link
Copy Markdown

Summary

Adds an invalidRequestSignatureHandler option to HTTPReceiver and ExpressReceiver, mirroring the existing functionality in AwsLambdaReceiver from PR #2154.

When a request fails signature verification, this handler fires before the 401 response is sent. It receives the signature, timestamp, body, request, and response objects so developers can add custom logging, metrics collection, or alerting.

Changes

  • Added ReceiverInvalidRequestSignatureHandlerArgs interface to HTTPModuleFunctions.ts
  • Added invalidRequestSignatureHandler option to HTTPReceiverOptions and ExpressReceiverOptions
  • Both receivers call the handler when signature verification fails
  • Exported the new interface from src/index.ts

Test plan

  • Ran existing HTTPReceiver and ExpressReceiver test suites - all tests pass
  • The implementation follows the same pattern as AwsLambdaReceiver

Fixes #2156

…eceivers

Adds an optional callback that fires when request signature verification
fails. This mirrors the existing behavior in AwsLambdaReceiver, letting
developers add custom logging, metrics, or alerting when invalid signatures
are detected.

Fixes slackapi#2156
@singhvishalkr singhvishalkr requested a review from a team as a code owner May 16, 2026 07:54
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 16, 2026

⚠️ No Changeset found

Latest commit: be8ad00

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@salesforce-cla
Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @singhvishalkr to sign the Salesforce Inc. Contributor License Agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add invalidRequestSignatureHandler to HTTP/ExpressReceiver

1 participant