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.dev4.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.dev4.tar.gz.

File metadata

File hashes

Hashes for swarmauri_keyprovider_remote_jwks-0.2.0.dev4.tar.gz
Algorithm Hash digest
SHA256 6c54bd9077708c9473f9ee64a7f9a5ab259bb571f90f73070610bff8d20a4ab8
MD5 ed34e0bd414b3b4448e089ac96cb47c1
BLAKE2b-256 f92eac520439fbb49200f2dc62ee8446a1b638539efae4afe6d27770fa21003d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swarmauri_keyprovider_remote_jwks-0.2.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 adc85d6813e0fdad6bf57209aaa260f5f29f8cdd99dc6ca950945b758eb4de9e
MD5 c279b9f3964a6df406c6cee1d18cf12e
BLAKE2b-256 d38b531633f656220f21e4162e0f53481ba75df6deac367db6dee25fe4251625

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