Skip to main content

JWKS-based JWT verification middleware for Swarmauri

Project description

Swamauri Logo

Swarmauri Middleware JWKS Verifier

A middleware component providing JWT verification using a cached JWKS with TTL and LRU eviction.

Features:

  • Supports RSA, EC, Ed25519, and HMAC keys from JWKS (RFC 7517)
  • Thread-safe cache with TTL refresh and LRU eviction
  • Optional issuer and algorithm whitelisting

Installation

pip install swarmauri_middleware_jwksverifier

Usage

from swarmauri_middleware_jwksverifier import CachedJWKSVerifier

verifier = CachedJWKSVerifier(fetch=my_fetch_jwks)
claims = verifier.verify(token, algorithms_whitelist=["RS256"], audience="me")

Entry Point

The middleware registers under the swarmauri.middlewares entry point as CachedJWKSVerifier.

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

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

File metadata

File hashes

Hashes for swarmauri_middleware_jwksverifier-0.3.0.dev3.tar.gz
Algorithm Hash digest
SHA256 47ad7667628441ee36e4ca7d786dd4dcdcf08d6539c8812b55bd3aa3d4e2a76d
MD5 deac68d8504ad43680b6f62e6d599534
BLAKE2b-256 bdc342126d3b5a93914437088ae5c622845ec9f2344c0e173fce0e1298bf06ce

See more details on using hashes here.

File details

Details for the file swarmauri_middleware_jwksverifier-0.3.0.dev3-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_middleware_jwksverifier-0.3.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 0575134be8bb69a3892f9c51bd986487e789bc9e155845a1e336a3a6c54578ff
MD5 80dc9e005216fd09811b34c98ecba7e3
BLAKE2b-256 2a3d1c2e575f83d6ae46422c4776202ac20813ba7010dff853abe63810382290

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