Crate jwtk[][src]

Expand description

JWT signing (JWS) and verification, with first-class ES256, JWK and JWK Set (JWKS) support.

Supports the HS256, RS256 and ES256 algorithms (for now). PR for others are welcome.

Supports exp and nbf validations. (Other validations will not be supported, because they are mostly application specific and can be easily implemented by applications themselves.)

See the examples folder for some examples.

Uses good old openssl for crypto. Because ring does not expose some necessary APIs, and others doesn’t seem mature enough.

Modules

JWK and JWK Set.

Structs

JWT Claims.

JWT header.

JWT header and claims.

Enums

Traits

Functions

Decode token.

Read an RSA/EC private key from PEM text representation.

Read an RSA/EC public key from PEM text representation.

Encode and sign this header and claims with the signing key.

Decode and verify token.

Decode and verify token, but do not check exp and nbf.

Type Definitions