Skip to main content

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

Metadata

Release files for hydratokengen 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hydratokengen 0.1.0
File Size Uploaded Provenance Actions
hydratokengen-0.1.0.tar.gz 5.1 kB Without provenance Details for hydratokengen-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hydratokengen 0.1.0
File Interpreter ABI Platform Actions
hydratokengen-0.1.0-py3-none-any.whl Python 3 none any Details for hydratokengen-0.1.0-py3-none-any.whl

Total release size: 10.9 kB

Release files / hydratokengen-0.1.0.tar.gz

Download URL hydratokengen-0.1.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
71ce0c1ed10d5f29aaf36c1d4e336b656d37937d84eb398eca0d901d268850df
BLAKE2b-256 checksum
How to use checksums
d594bdd32d8b4d9e5c3bafd9ea9c7028dbacd1179cbe1be0a924f970ec0a9854
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.7.10 Darwin/20.6.0

Release files / hydratokengen-0.1.0-py3-none-any.whl

Download URL hydratokengen-0.1.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d6b4e2d4b51e71ad66df9daf64e0211515def83f8c65f30913f9dda9b55d071
BLAKE2b-256 checksum
How to use checksums
ad0ff2a70bf8475c76465a9cbec8d34dfed8cdf8fb18235a2338ac646ac367af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.7.10 Darwin/20.6.0

Security for hydratokengen 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page