This release is a pre-release and may not be stable for production use.
swarmauri_tokens_rotatingjwt
Rotating JWT token service plugin for Swarmauri.
This package provides a token issuer/verifier that automatically rotates its
signing key. It exposes a RotatingJWTTokenService implementing
ITokenService and conforms to RFC 7515, 7517, 7518 and 7519.
Features
- Supports RS256, PS256, ES256, EdDSA and HS256 algorithms.
- Automatic key rotation based on time or token count.
- JWKS publication retaining previous key versions.
Installation
uv add swarmauri_tokens_rotatingjwt
Optional extras are available for specific signing canons:
uv add swarmauri_tokens_rotatingjwt[rsa]
uv add swarmauri_tokens_rotatingjwt[ecdsa]
uv add swarmauri_tokens_rotatingjwt[eddsa]
uv add swarmauri_tokens_rotatingjwt[hmac]
Usage
from swarmauri_tokens_rotatingjwt import RotatingJWTTokenService
from swarmauri_keyprovider_inmemory import InMemoryKeyProvider
from swarmauri_core.crypto.types import JWAAlg
kp = InMemoryKeyProvider()
service = RotatingJWTTokenService(kp, alg=JWAAlg.RS256)
token = await service.mint({"sub": "alice"}, alg=JWAAlg.RS256)
claims = await service.verify(token)
jwks = await service.jwks()
The service handles key rotation based on time or token volume and exposes a JWKS endpoint that includes previous keys so existing tokens remain valid.
Want to help?
If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.
Metadata
Release files for swarmauri_tokens_rotatingjwt 0.11.0.dev1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| swarmauri_tokens_rotatingjwt-0.11.0.dev1.tar.gz | 11.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swarmauri_tokens_rotatingjwt-0.11.0.dev1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.2 kB
Release files / swarmauri_tokens_rotatingjwt-0.11.0.dev1.tar.gz
| Download URL | swarmauri_tokens_rotatingjwt-0.11.0.dev1.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e4a20e2678fe73e43cc353974bbb0fdc479731bc48a42c9d59e134609cde1e8
|
|
BLAKE2b-256 checksum How to use checksums |
54c343699d3db03f86a92f7d4e78749029dfb5776a55b8b9b2e8547d23dbc56f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / swarmauri_tokens_rotatingjwt-0.11.0.dev1-py3-none-any.whl
| Download URL | swarmauri_tokens_rotatingjwt-0.11.0.dev1-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
978f6c9819d23bc49ba08e3e0d50e2112765b7bc48075f4dcfb1a56ca33bb9bc
|
|
BLAKE2b-256 checksum How to use checksums |
1ab0a472530d623c39dad2ba5b072ce96be2729b56c2fd3593b94fd911e30756
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|