ssi
ssi copied to clipboard
JWTClaims timestamp type representations
The JWTClaims struct (representing a JWT claims JSON object) includes some fields for timestamps:
(There's also a "iat" (Issued At) Claim which we don't yet support.)
#315 changes the type for these claim parameter values from i64 to a struct NumericDate
that wraps a f64. NumericDate
aims to implement the NumericDate type from RFC 7519 which these claims are specified to use. It is implemented to support microsecond precision for timestamps in the range from about year 1685 to year 2255. It is also supposed to be convertible between the VC Data Model date-time properties (issuanceDate, expirationDate, and proof.created
) Is support needed for timestamps outside this range, or using a simple type (i.e. without floats)? This could be support through use of an enum or by Cargo features.