rrrodzilla / rusty_paseto

A type-driven, ergonomic RUST implementation of the PASETO protocol for secure stateless tokens.
https://crates.io/crates/rusty_paseto
MIT License
68 stars 8 forks source link

De-dupe claim keys in builder #7

Closed rrrodzilla closed 2 years ago

rrrodzilla commented 2 years ago

Claim keys should only appear once in the top-level JSON payload of the builder to prevent the user from accidentally overwriting claim data in a single build session which would cause confusion. Users should groups of duplicate keys in a child struct with a unique claim key to enable that scenario.