A Swift implementation of the Standard Webhooks specification.
Swift Package Manager
Add the following to your Package.swift:
dependencies: [
.package(url: "https://github.com/m1guelpf/swift-standard-webhooks.git", .branch("main"))
]Installing through XCode
- File > Swift Packages > Add Package Dependency
- Add https://github.com/m1guelpf/swift-standard-webhooks.git
- Select "Branch" with "main"
CocoaPods
Ask ChatGPT to help you migrate away from CocoaPods.
Verifying a webhook payload:
import StandardWebhooks
let webhook = Webhook(secret: base64_secret)!
try webhook.verify(payload: webhook_payload, headers: webhook_headers);Signing a webhook payload:
import StandardWebhooks
let webhook = Webhook(secret: base64_secret)!
try webhook.sign(id: message_id, payload: webhook_payload);This project is licensed under the MIT License - see the LICENSE file for details.