Skip to content

feat: add webhooks and callbacks support - #102

Merged
haseeb-mhr merged 5 commits into
mainfrom
feat/webhooks-callbacks-support
Oct 24, 2025
Merged

haseeb-mhr merged 5 commits into
mainfrom
feat/webhooks-callbacks-support

Conversation

@haseeb-mhr

Copy link
Copy Markdown
Collaborator

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause a breaking change)
  • Tests (adds or updates tests)
  • Documentation (adds or updates documentation)
  • Refactor (style improvements, performance improvements, code refactoring)
  • Revert (reverts a commit)
  • CI/Build (adds or updates a script, change in external dependencies)

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

  • My code follows the coding conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added new unit tests

@haseeb-mhr haseeb-mhr self-assigned this Oct 23, 2025
@haseeb-mhr haseeb-mhr added the enhancement New feature or request label Oct 23, 2025

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
haseeb-mhr marked this pull request as ready for review October 23, 2025 12:50
@sonarqubecloud

Copy link
Copy Markdown

@haseeb-mhr
haseeb-mhr merged commit 1314667 into main Oct 24, 2025
4 checks passed
@asadali214
asadali214 deleted the feat/webhooks-callbacks-support branch October 24, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants