Closed lcmgh closed 10 months ago
Hi, you can use anything that is Clone + DeserializeOwned + Send + Sync as claims, I think you can use RegisteredClaims from rust-jwt (I did not try but it should work). However I can add serialisation support for the type NumericDate and RegisteredClaims (if you want you can add a pull request).
Serialize
is not implemented for types of the standard token claim such asOneOrArray<T>
orNumericDate
.I am currently working with https://github.com/mikkyang/rust-jwt for creating some tests based on a self signed token. The lib accepts claims that implement
Serialize
which means I cannot reuse my custom claims created for usage withinjwt-authorizer
as they use fields such asNumericDate
.