Remote JWKS-backed key provider for verification-only use
Project description
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
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
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 swarmauri_keyprovider_remote_jwks-0.2.0.dev5.tar.gz.
File metadata
- Download URL: swarmauri_keyprovider_remote_jwks-0.2.0.dev5.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5bc955e724f45d64326f4d0c9b70c63996eaa61b1f43deefdce3f2e02776aec
|
|
| MD5 |
03f3e0eb548c4a34d9e409591584b2e5
|
|
| BLAKE2b-256 |
e20c6ed25ab068495c74ab24f9dd6415c853b2c1c53b43066003fff7a86e6b69
|
File details
Details for the file swarmauri_keyprovider_remote_jwks-0.2.0.dev5-py3-none-any.whl.
File metadata
- Download URL: swarmauri_keyprovider_remote_jwks-0.2.0.dev5-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
176846f6192390cee6031956aa5bf5b8b2823bf1f551f92f9cb4716170ffb94f
|
|
| MD5 |
dd15e366247c55bd9f29c0b53f9f9861
|
|
| BLAKE2b-256 |
fc2f820063a049e83a5078a6dce976dd15a298c6942c69c2cc33a7baad9543eb
|