Skip to main content

Crate jwtea

Crate jwtea 

Source
Expand description

Lean JWT library for asymmetric signature schemes, using aws-lc-rs.

Note: this currently only contains APIs for “verifying JWT”, not for generating JWTs.

jwtea is a toolbox, not a framework. It provides functionality that are always needed when dealing with JWTs, but you might still have to plug things together. The API was still designed in a way to make it hard to introduce security problems in your application.

This library is also mindful of performance where it matters: creating and validating JWTs. It does not deserialize unused header or payload fields, and tries to avoid memory allocations as much as possible.

This library is not for everyone: it does not and will not implement symmetric signature schemes or JWEs, for example.

Re-exports§

pub use self::jwk::Jwks;
pub use self::jwk::Jwk;

Modules§

jwk
Types mirroring the JWK(S) structures.

Structs§

BasicValidator
A Validator that checks exp and nbf claims.
Header
A JWT header.
NumericDate
A JWT NumericDate (see RFC 7519), e.g. used for exp and nbf.
Payload
A JWT payload.
RawJwt
A raw (undecoded and unverified) JWT. Basically a wrapper around a string split into header, payload and signature.
SignatureValid
A zero-sized type as a token to represent a valid signature check.
VerifyingKey
A cryptographic key for verifying signatures.

Enums§

Alg
Values for the alg field of a JWT or JWK.
Error
Errors produced by this library.

Traits§

SignatureVerifier
Something to verify a JWT’s signature with.
Validator
Validator for JWT claims.

Functions§

decode
Decodes the given JWT, verifies its signature, validates its claims, and finally giving you access to its payload.