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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6219eb15fef04ed8f4d63af7bc84579ee08c738d38a08baca4e8d0270c6b984
|
|
| MD5 |
d72567b83892e98124e7ce86b180d4ff
|
|
| BLAKE2b-256 |
39f91b83695b48d2f41a5ba5c458e7777060076a05990a36b52b4614edac62b6
|
File details
Details for the file ship_it_validate-0.4.0-py3-none-any.whl.
File metadata
- Download URL: ship_it_validate-0.4.0-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cc9ae26d625ae366f8e597ec7b48ca2ddb4502aa6dc83243b7617804de8af63
|
|
| MD5 |
64cabd77336057eecdd807dab5999a51
|
|
| BLAKE2b-256 |
9dc065ceeaec22edef6d5f113ef6b4c595fec1d9628f9eeabcd74cca62d7dd99
|