Crate biscuit [] [src]

Create, parse, and verify JWT (JSON Web Tokens)

Usage

[dependencies]
biscuit = "0.0.1"

See [JWT] for usage examples.

Modules

errors

Errors returned will be converted to one of the structs in this module.

jws

Related to the JWS RFC, including JWT signing and headers

Structs

ClaimsSet

A collection of claims, both registered and your custom private claims.

RegisteredClaims

Registered claims defined by RFC7519#4.1

TemporalValidationOptions

Options for claims time validation By default, no temporal claims (namely iat, exp, nbf) are required, and they will pass validation if they are missing. Should any temporal claims be needed, set the appropriate fields. To deal with clock drifts, you might want to provide an epsilon error margin in the form of a std::time::Duration to allow time comparisons to fall within the margin.

Timestamp

Wrapper around DateTime<UTC> to allow us to do custom de(serialization)

Enums

JWT

A JWT that can be encoded/decoded

SingleOrMultipleStrings

Represents a choice between a single string value or multiple strings