Closed hariria closed 9 months ago
CC @Progdrasil @mitchchn
Hi @Progdrasil addressed your comments above. Let me know if this looks good to you
@Progdrasil I've gone ahead and made changes to address some of the concerns you brought up, re-ran tests, fmt, and clippy. Please let me know if this looks good to you
@Progdrasil I've gone ahead and addressed the feedback above, removed the client_data_json custom serialization method. I'm still a bit confused on how you want me to create tests for checking byte serialization of CollectedClientData when you also don't want me to include the bytes themselves for validation, but please let me know if my explanation here makes sense https://github.com/1Password/passkey-rs/pull/6#discussion_r1416392151. Would like to wrap this up in the next day or two if possible.
Great thanks. Will there be a semver bump to the crate anytime soon so I can use the latest changes?
Yes! I've just gone through and audited the current version on main in preparation of doing a release. #10
Summary
The WebAuthn specification uses a custom serialization format for converting
CollectedClientData
into json bytes (see §5.8.1.1 of the WebAuthn specification for more information). This is not needed for verification of passkey signatures but is helpful for testing.CollectedClientData
is also a struct that can be extended in the future. This PR added a new field underCollectedClientData
calledunknown_keys
to ensure that new fields would be serialized correctlyLastly, this PR implements some dependency bumps to ensure
passkey-rs
is up to date and compatible with other rust projects that may consume it.Detailed changes
clientDataJSON
viato_json_bytes()
CollectedClientData
extendable in the event that new fields are added in the future, changed field macros to ensure serde would serialize them properly if empty (see §5.8.1.1 of the WebAuthn specification)Test plan
CollectedClientData
struct json byte encoding, using a Secure Payment Confirmation (SPC) payloadCollectedClientData
struct json byte encodingcargo clippy
andcargo fmt
andcargo test