Repository navigation
feat: add webhooks and callbacks support - #102
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds webhooks and callbacks support to the GoSDK by introducing signature verification mechanisms. The implementation focuses on HMAC-based signature verification for HTTP requests, enabling secure event-driven integrations with external systems.
Key changes:
- Introduced HMAC signature verification infrastructure with support for multiple hash algorithms (SHA256, SHA512)
- Added digest encoding/decoding capabilities (Hex, Base64, Base64URL)
- Implemented request body reading utilities for signature verification
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| security/verification_result.go | Defines the structure for representing signature verification outcomes with success/failure states and error details |
| security/hmac_signature_verifier.go | Implements HMAC-based signature verification for HTTP requests with configurable algorithms and templates |
| security/hmac_signature_verifier_test.go | Comprehensive test suite covering constructor validation, signature verification scenarios, and template variations |
| security/digest_codec.go | Provides digest encoding/decoding interfaces and implementations for Hex, Base64, and Base64URL formats |
| security/digest_codec_factory_test.go | Tests for digest codec encode/decode operations across all supported formats |
| https/httpContext.go | Adds ReadRequestBody utility function for reading HTTP request bodies |
| https/httpContext_test.go | Test coverage for the new ReadRequestBody function |
| README.md | Updates documentation to describe the new security package and its components |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
haseeb-mhr
marked this pull request as ready for review
October 23, 2025 12:50
|
asadali214
approved these changes
Oct 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
Add webhooks and callbacks support in the GoSDK, enabling users to register, configure, and handle webhook/callback events directly through the SDK.
Why
Provides seamless event-driven integration with external systems and improves developer experience by supporting standardized webhook and callback mechanisms.
Type of change
Select multiple if applicable.
Dependency Change
No new dependencies are added.
Breaking change
No breaking changes are introduced in this PR.
Testing
New tests are added to cover the additional features.
Checklist