Minimalistic JSON web token (JWT) implementation with focus on type safety and secure cryptographic primitives.
See the crate docs for the examples of usage.
HS256
, HS384
and HS512
algorithms are implemented via pure Rust [sha2
] crate.EdDSA
algorithm with the Ed25519 elliptic curve, and ES256K
algorithm
with the secp256k1 elliptic curve. Both curves are widely used in crypto community
and believed to be securely generated (there are some doubts about parameter generation
for elliptic curves used in standard ES*
algorithms).RS*
and PS*
) and standard elliptic curve (ES*
) algorithms.iss
– the token issuer).
This is intentional: depending on the use case, such claims can have different semantics
and thus be represented by different datatypes (e.g., iss
may be a human-readable short ID,
a hex-encoded key digest, etc.)[jsonwebtoken
], [frank_jwt
] or [biscuit
] may be viable alternatives depending on the use case
(e.g., none of them seems to implement EdDSA
or ES256K
algorithms).
Licensed under the Apache-2.0 license.