-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ABW-3969] Shield Setup Select Factors - utility functions (#297)
* wip * wip * wip * bump version * wip * address feedback
- Loading branch information
1 parent
217f10a
commit a2b1692
Showing
13 changed files
with
364 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
crates/sargon-uniffi/src/profile/mfa/security_structures/selected_factor_sources_status.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use crate::prelude::*; | ||
use sargon::SelectedFactorSourcesForRoleStatus as InternalSelectedFactorSourcesForRoleStatus; | ||
|
||
/// Represents the status of selected factor sources for a specific role in the Security Shield building process. | ||
/// Primarily used for UI logic representation in host applications. | ||
#[derive( | ||
Clone, Copy, Debug, PartialEq, Eq, InternalConversion, uniffi::Enum, | ||
)] | ||
pub enum SelectedFactorSourcesForRoleStatus { | ||
/// The selected factor sources are optimal for the specified role | ||
/// in the Security Shield building process. | ||
Optimal, | ||
|
||
/// The selected factor sources are suboptimal for the specified role | ||
/// in the Security Shield building process. | ||
/// | ||
/// Note: Typically used in hosts as a warning message. | ||
Suboptimal, | ||
|
||
/// The selected factor sources are insufficient for the specified role | ||
/// in the Security Shield building process. | ||
Insufficient, | ||
|
||
/// The selected factor sources form an invalid combination for the specified role | ||
/// in the Security Shield building process. | ||
/// | ||
/// Example: A Password factor source cannot be used alone for the Primary role. | ||
Invalid, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.