Skip to main content

low-code authentication and billing

Project description

Ship It Validate

This package can be used to easily validate headers signed by Ship It.

Install

pip install ship-it-validate

Usage

Make sure to set the SHIP_IT_PUBLIC_KEY environment variable to the base64 encoded public key provided in the Ship It site configuration page.

Flask

from ship_it_validate import validate
from flask import request

@app.before_request
def before_request():
    try:
        validate(
            request.headers.get('X-PROXY-SIGNATURE'),
            request.headers.get('X-USER-SUB'),
            request.headers.get('X-PROXY-TIMESTAMP'),
        )
    except ValueError as e:
        app.logger.warning('Invalid Ship It signature: %s', e)
        return "Unauthorized", 401

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

ship_it_validate-0.4.0.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

ship_it_validate-0.4.0-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file ship_it_validate-0.4.0.tar.gz.

File metadata

  • Download URL: ship_it_validate-0.4.0.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for ship_it_validate-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a6219eb15fef04ed8f4d63af7bc84579ee08c738d38a08baca4e8d0270c6b984
MD5 d72567b83892e98124e7ce86b180d4ff
BLAKE2b-256 39f91b83695b48d2f41a5ba5c458e7777060076a05990a36b52b4614edac62b6

See more details on using hashes here.

File details

Details for the file ship_it_validate-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ship_it_validate-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cc9ae26d625ae366f8e597ec7b48ca2ddb4502aa6dc83243b7617804de8af63
MD5 64cabd77336057eecdd807dab5999a51
BLAKE2b-256 9dc065ceeaec22edef6d5f113ef6b4c595fec1d9628f9eeabcd74cca62d7dd99

See more details on using hashes here.

Supported by

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