No project description provided
Project description
HydraTokenGen
ORY Hydra JWT generator.
Install
pip install hydratokengen
Usage
from hydratokengen import CachedTokenGen, HydraTokenGen
hydra_token_gen = CachedTokenGen(HydraTokenGen(
hydra_public_url="http://localhost:4444",
hydra_admin_url="http://localhost:4445",
client_id="636986d6-f505-486a-839c-57bb6a881aca",
client_secret="CLIENTSECRET",
redirect_uri="http://localhost/callback",
))
token = hydra_token_gen.generate(
subject="1234",
access_token={"claim1": "value1"},
id_token={"claim2": "value2"},
)
Development
Format code
poetry run black hydratokengen tests
Testing
Start Hydra:
docker-compose up -d
Install dependencies:
poetry install
Run tests
poetry run pytest
HTML coverage report:
poetry run pytest --cov=hydratokengen --cov-report=html
open htmlcov/index.html
Publish a new version
Bump the version number in hydratokengen/__init__.py and run:
poetry publish
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
hydratokengen-0.1.0.tar.gz
(5.1 kB
view details)
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 hydratokengen-0.1.0.tar.gz.
File metadata
- Download URL: hydratokengen-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.7.10 Darwin/20.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71ce0c1ed10d5f29aaf36c1d4e336b656d37937d84eb398eca0d901d268850df
|
|
| MD5 |
44cc405ada06aa707cc30536f6d4f7e9
|
|
| BLAKE2b-256 |
d594bdd32d8b4d9e5c3bafd9ea9c7028dbacd1179cbe1be0a924f970ec0a9854
|
File details
Details for the file hydratokengen-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hydratokengen-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.7.10 Darwin/20.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d6b4e2d4b51e71ad66df9daf64e0211515def83f8c65f30913f9dda9b55d071
|
|
| MD5 |
854b73edd61f513c24c3b72de9668db6
|
|
| BLAKE2b-256 |
ad0ff2a70bf8475c76465a9cbec8d34dfed8cdf8fb18235a2338ac646ac367af
|