fdo-rs / fido-device-onboard-rs

An implementation of the FIDO Device Onboard (FDO) spec written in Rust.
BSD 3-Clause "New" or "Revised" License
62 stars 34 forks source link

fix(serviceinfo): no authentication is needed when omitting `service_info_auth_token` #441

Closed nak3 closed 1 year ago

nak3 commented 1 year ago

This patch supports no authentication for service info by using Option() for service_info_auth_token.

Current docs asks users to set None if no authentication is needed but serde_yaml library does not handle the None as Rust's None. So this patch supports service_info_auth_token as Option() to allow "no authentication is needed" when it is omitted.

Alternatively it is possible to support "None" or "" (empty string) as a special case to disable authorization. Any suggestion is welcome.

Fix https://github.com/fedora-iot/fido-device-onboard-rs/issues/403

7flying commented 1 year ago

Thanks for this! Two small changes: can you change the commit format it to that it follows our standard? We need something like fix(serviceinfo): <message>. Then you'll have to rebase, we have handled the spellcheck warning that shows up in CI but has nothing to do with your PR.

nak3 commented 1 year ago

Thank you for the review! Sure I have updated it.