Skip to main content

Remote JWKS-backed key provider for verification-only use

Project description

Swamauri Logo

Swarmauri Remote JWKS Key Provider

Key provider backed by a remote JWKS endpoint with local key management.

Installation

pip install swarmauri_keyprovider_remote_jwks

Usage

The provider fetches verification keys from a remote JWKS URL or through an OpenID Connect (OIDC) issuer. It also embeds an in-memory key provider to create and manage local keys. The example below fetches a JWK from a JWKS endpoint and prints its public fields:

import asyncio
from swarmauri_keyprovider_remote_jwks import RemoteJwksKeyProvider


async def main() -> None:
    provider = RemoteJwksKeyProvider(
        jwks_url="https://example.com/.well-known/jwks.json"
    )

    # Optional: pre-fetch the JWKS; otherwise the first key lookup triggers it
    provider.refresh(force=True)

    jwk = await provider.get_public_jwk("test", version=1)
    print(jwk)


asyncio.run(main())

You can also construct the provider from an OIDC issuer. The provider resolves the issuer's discovery document to find the JWKS URL:

RemoteJwksKeyProvider(issuer="https://issuer.example.com")

Locally created keys are available via the standard key provider APIs and are
included alongside remote keys when calling `jwks()`.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_keyprovider_remote_jwks-0.2.0.dev5.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file swarmauri_keyprovider_remote_jwks-0.2.0.dev5.tar.gz.

File metadata

File hashes

Hashes for swarmauri_keyprovider_remote_jwks-0.2.0.dev5.tar.gz
Algorithm Hash digest
SHA256 e5bc955e724f45d64326f4d0c9b70c63996eaa61b1f43deefdce3f2e02776aec
MD5 03f3e0eb548c4a34d9e409591584b2e5
BLAKE2b-256 e20c6ed25ab068495c74ab24f9dd6415c853b2c1c53b43066003fff7a86e6b69

See more details on using hashes here.

File details

Details for the file swarmauri_keyprovider_remote_jwks-0.2.0.dev5-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_keyprovider_remote_jwks-0.2.0.dev5-py3-none-any.whl
Algorithm Hash digest
SHA256 176846f6192390cee6031956aa5bf5b8b2823bf1f551f92f9cb4716170ffb94f
MD5 dd15e366247c55bd9f29c0b53f9f9861
BLAKE2b-256 fc2f820063a049e83a5078a6dce976dd15a298c6942c69c2cc33a7baad9543eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page