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

CAS-5564/Add webhooks docs #97

Merged
merged 5 commits into from
Jan 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Installation
Configuration
-------------

import and configure the library with your Castle API secret.
Import and configure the library with your Castle API secret.

.. code:: python

Expand Down Expand Up @@ -209,6 +209,20 @@ Exceptions
level HTTP response. You can also choose to catch a more `finegrained
error <https://github.com/castle/castle-python/blob/master/castle/errors.py>`__.

Webhooks
--------

Castle uses webhooks to notify about ``$incident.confirmed`` or `$review.opened` events.
Each webhook has ``X-Castle-Signature`` header that allows verifying webhook's source.

.. code:: python

from castle.webhooks.verify import WebhooksVerify

# Verify the webhook, passed as a Request object
WebhooksVerify.call(webhook_request)
# WebhookVerificationError is raised when the signature is not matching

Documentation
-------------

Expand Down