bitwarden / sdk

Bitwarden SDK.
Other
237 stars 37 forks source link

Migrate fido logic to use explicit errors #835

Closed Hinton closed 3 months ago

Hinton commented 3 months ago

🎟ī¸ Tracking

📔 Objective

This PR establishes explicit error types for the fido logic.

In order to extract the fido logic into a separate bitwarden-fido crate, we need to remove the dependencies on the bitwarden logic. Most of this is either the Client struct which is currently difficult, or the Error and Result types which this PR focuses on.

⏰ Reminders before review

đŸĻŽ Reviewer guidelines

github-actions[bot] commented 3 months ago

Logo Checkmarx One – Scan Summary & Details – eb7837b5-bbbd-4980-b007-7bc0b88bed73

No New Or Fixed Issues Found

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 5.76923% with 147 lines in your changes missing coverage. Please review.

Project coverage is 58.83%. Comparing base (3f56e58) to head (2b9ceb1).

Files Patch % Lines
...ates/bitwarden/src/platform/fido2/authenticator.rs 0.00% 82 Missing :warning:
crates/bitwarden-uniffi/src/platform/fido2.rs 0.00% 25 Missing :warning:
crates/bitwarden/src/platform/fido2/mod.rs 25.00% 21 Missing :warning:
crates/bitwarden/src/platform/fido2/client.rs 0.00% 9 Missing :warning:
crates/bitwarden/src/platform/fido2/crypto.rs 0.00% 7 Missing :warning:
crates/bitwarden/src/platform/fido2/types.rs 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #835 +/- ## ========================================== - Coverage 59.24% 58.83% -0.42% ========================================== Files 186 186 Lines 12426 12517 +91 ========================================== + Hits 7362 7364 +2 - Misses 5064 5153 +89 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.