Secure API Signature Mechanism
Internal used for creating signed url for server installed api-key-server
Install
pip install api-key-client
Example:
sign_request_1(url, api_key, api_secret)recommand
>>> from api_key_client.utils import sign_request_1
>>> url = 'https://api.example.co/sample/something-important/'
>>> sign_request_1(url, 'SOME-TEST', 'some-key-xxxxxx')
'https://api.example.co/sample/something-important/?api_key=SOME-TEST×tamp=20220209144716&sign=7f210048e1e972d968186f8a35a86f9a'
-
sign_request_1(url, api_secret)place api_key in url
# sign.py
>>> from api_key.utils import sign_request, sign_request_1
>>> url = 'https://example.site.com/sample/secret-info/?api_key=xxx&xxxxx=true&id=163'
>>> url = sign_request(url, 'your_secret')
> Note:
please check system date to the correct timezone,
Otherwise the timeout checking could be invalid
For docker container (alpine)
```dockerfile
RUN apk add --updat tzdata
ENV TZ=Pacific/Auckland
Release files for django-api-key-server 0.1.19
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-api-key-server-0.1.19.tar.gz | 5.6 kB | Details |
Release files / django-api-key-server-0.1.19.tar.gz
| Download URL | django-api-key-server-0.1.19.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f20817947c1bcd2a392285694db38a7c63284bf84abdf4f3a45106f1b94ec94
|
|
BLAKE2b-256 checksum How to use checksums |
49fecd8e46df3e658117ea9a1ac4133ee7f134ba9ff3aa478e9cda2f4243704a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.8
|