-
-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Draft] Add credProtect extension to Fido2.Models (#448)
- Loading branch information
Showing
5 changed files
with
89 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Runtime.Serialization; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Fido2NetLib.Objects; | ||
|
||
/// <summary> | ||
/// CredentialProtectionPolicy | ||
/// https://fidoalliance.org/specs/fido-v2.2-rd-20230321/fido-client-to-authenticator-protocol-v2.2-rd-20230321.html#sctn-credProtect-extension | ||
/// </summary> | ||
[JsonConverter(typeof(FidoEnumConverter<CredentialProtectionPolicy>))] | ||
public enum CredentialProtectionPolicy | ||
{ | ||
/// <summary> | ||
/// This reflects "FIDO_2_0" semantics. In this configuration, performing some form of user verification is OPTIONAL with or without credentialID list. | ||
/// This is the default state of the credential if the extension is not specified | ||
/// </summary> | ||
[EnumMember(Value = "userVerificationOptional")] | ||
UserVerificationOptional = 0x01, | ||
|
||
/// <summary> | ||
/// In this configuration, credential is discovered only when its credentialID is provided by the platform or when some form of user verification is performed. | ||
/// </summary> | ||
[EnumMember(Value = "userVerificationOptionalWithCredentialIDList")] | ||
UserVerificationOptionalWithCredentialIdList = 0x02, | ||
|
||
/// <summary> | ||
/// TThis reflects that discovery and usage of the credential MUST be preceded by some form of user verification. | ||
/// </summary> | ||
[EnumMember(Value = "userVerificationRequired")] | ||
UserVerificationRequired = 0x03 | ||
} |
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