Skip to main content

Google Wallet webhook signature verification utilities for Python.

Project description

google-wallet-webhook-auth

Google Wallet webhook signature verification utilities for Python.

Features

  • Verify Google Wallet webhook signatures according to official documentation
  • Utilities for handling Google Pay cryptographic signature formats
  • Typed and tested Python code

Installation

pip install google-wallet-webhook-auth

Usage

An example with flask :

from flask import Flask, request, jsonify, abort
from google_wallet_webhook_auth import Validator
from google_wallet_webhook_auth.exceptions import SignatureVerificationError


app = Flask(__name__)

@app.route("/webhook/google/events", methods=['POST'])
def event_webhook():
    data = request.get_json()
    try:
        Validator("YOUR_ISSUER_ID").validate(data)
    except SignatureVerificationError:
        abort(401)

if __name__ == '__main__':
    app.run(debug=True)

Development

  • Install deps: uv sync --all-extras
  • Run tests: uv run pytest
  • Lint and format: pre-commit run --all-files
  • Before commit: pre-commit install

License

This project is licensed under the GPL-3.0-or-later. See LICENSE for details.

Made with ❤️

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google_wallet_webhook_auth-0.1.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

google_wallet_webhook_auth-0.1.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file google_wallet_webhook_auth-0.1.0.tar.gz.

File metadata

File hashes

Hashes for google_wallet_webhook_auth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5bd8d6f9920fc0b95cce073a3d35bde8d3b3ed1f1a8be0f4a448bfa285add125
MD5 31320c43a0a2469edb428b43d634ed35
BLAKE2b-256 8f5a540be440adbdfa15ced1c89f0f18aae9394f32b26bed5e787d751c9c615e

See more details on using hashes here.

File details

Details for the file google_wallet_webhook_auth-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for google_wallet_webhook_auth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3af72b9f6e61aba60c6d13fcb329654a78764ec3c147aac3e86b89cb091c4051
MD5 57b9d262f2c1a65aa8441ddc254d39fd
BLAKE2b-256 f34e01c7080a8335863dcf4c4d9745c34a9a02da0e01e1f43c8778f6ab408beb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page