Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Scaffold initial CWT support * Add initial serialization test from RFC 8392 * Add support for some registered claims and update test * Update signing test to reflect RFC 8392 example * Reorganize, rename, cleanup files * Rename IANAClaim -> Claim * Implement claims using traits * Add support for fractional date strings * Add deserialization tests * Add define_claim macro to reduce boilerplate * Add tests for other key types and roundtrip serialization * Rename Key -> Label (adhere to rfc8152 and rest of repo) * Add more detailed failure message in signing test * Implement custom error for CWT * Make ClaimsSet's inner BTreeMap actually private * Apply suggestions from code review Co-authored-by: Jacob <[email protected]> * Address PR feedback: add units to NumericDate * Revert "Rename Key -> Label (adhere to rfc8152 and rest of repo)" This reverts commit 61c8e16. * Re-add permissive ClaimsSet insert and retrieval functions * Make macro private * Remove roundtrip test * Add and update docstrings for public functions Update ClaimsSet docstrings * Add remove_* methods for claims * Reorganize files into one cwt module * Add claims_set convenience setter+getter to CoseSign and builder * Fix *_claim to return a claim struct * Small fix to claims_set return type (to Option<Result> to match style * First pass at to-from NumericDate helpers * Implements date conversion using mul_to_int * Add .DSSTORE to .gitignore * Remove serde errors except for bytes and numericDate * Remove commented out line * Revert "Small fix to claims_set return type (to Option<Result> to match style" This reverts commit 167db3b. * Change return types from Option<Result> to Result<Option> * Shorten claims_set return * Implement TryFrom<Value> for NumericDate * Add docstring + nits * Reduce boilerplate in claims serialization --------- Co-authored-by: Jacob <[email protected]>
- Loading branch information