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

File metadata

File hashes

Hashes for swarmauri_keyprovider_remote_jwks-0.2.0.dev3.tar.gz
Algorithm Hash digest
SHA256 1f0f3d60069389666fd23f0067f60e939643231ef0cc1d99c4be000a9e82c4d4
MD5 33b9ea4d52d0105f25b2a4302be798ae
BLAKE2b-256 fd027ced0a53b510a95b80072d862c8af3cc3b880b80219143b8af844abaa5d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swarmauri_keyprovider_remote_jwks-0.2.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 27459f7429505a0512ac5d03c27abe5a0c4eff4cc1e413ab3a2e021017847f9c
MD5 32b95d633b843e06fbf5cee48270699e
BLAKE2b-256 75631a79a5ac76d431263b44f54b9f1728074e7081d24c60bf169dbd250216c3

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