JOSE protocol implementation in Python with support for JSON Web Algorithms, Keys, and Signatures
73
A command-line helper that signs and verifies payloads using compact JWS, enforcing protected algorithm headers and key-type-aware verification.
"alg" with the requested algorithm. @test@generates
def build_compact_token(
payload: bytes,
key_path: str,
algorithm: str,
unprotected_headers: dict | None = None,
) -> bytes:
"""Create a compact JWS for the payload using the given key file and algorithm, ensuring the algorithm is protected."""
def verify_compact_token(
token: bytes,
key_path: str | None = None,
key_type: str | None = None,
) -> bytes:
"""Verify a compact JWS token using the provided key file and key type hint, returning the payload bytes on success."""Provides CLI tooling and helpers for creating and verifying JOSE signatures with protected headers and key-type selection.
Install with Tessl CLI
npx tessl i tessl/pypi-josepyevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10