truelayer-signing
Python package to produce & verify TrueLayer API requests signatures.
Install
pip install truelayer-signing
Generating a signature
tl_signature = sign_with_pem(KID, PRIVATE_KEY) \
.set_method(HttpMethod.POST) \
.set_path(path) \
.add_header("Idempotency-Key", idempotency_key) \
.set_body(body) \
.sign()
See full example.
Verifying webhooks
The verify_with_jwks function may be used to verify webhook Tl-Signature header signatures.
# `jku` field is included in webhook signatures
jws_header = extract_jws_header(webhook_signature).jku
# check `jku` is an allowed TrueLayer url & fetch jwks JSON (not provided by this lib)
ensure_jku_allowed(jku)
jwks = fetch_jwks(jku)
# jwks may be used directly to verify a signature
verify_with_jwks(jwks, jws_header) \
.set_method(HttpMethod.POST) \
.set_path(path) \
.add_headers(headers) \
.set_body(body) \
.verify(tl_signature)
Metadata
Release files for truelayer-signing 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| truelayer_signing-0.4.0.tar.gz | 10.7 kB | Without provenance | Details for truelayer_signing-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| truelayer_signing-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for truelayer_signing-0.4.0-py3-none-any.whl |
Total release size: 24.7 kB
Release files / truelayer_signing-0.4.0.tar.gz
| Download URL | truelayer_signing-0.4.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b1fb067b23feb8af1ad3a929bf48b69a9dc357ed60bd56615fecca3b9d8c5aa
|
|
BLAKE2b-256 checksum How to use checksums |
807e221b0ee24b5a04ecb2f0bf9de18e7a4ee9a513570dff8a96977d8538c407
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1018-azure
|
Release files / truelayer_signing-0.4.0-py3-none-any.whl
| Download URL | truelayer_signing-0.4.0-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a97ca087bcc3fae64642bab24daafb76cbd2e3af4d30d5550551792629182e0c
|
|
BLAKE2b-256 checksum How to use checksums |
712daaa3742647f71eb6dea320ce7127c8ede8ebe786bb9a039f1c73efabb25b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1018-azure
|
Security for truelayer-signing 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.