Skip to content

Commit

Permalink
Add smart-card and hybrid transports (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeinder authored Oct 16, 2023
1 parent 15263ca commit eb312de
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Src/Fido2.Ctap2/Extensions/PubKeyCredParamExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ public static string Canonicalize(this AuthenticatorTransport value)
#pragma warning disable format
return value switch
{
AuthenticatorTransport.Usb => "usb",
AuthenticatorTransport.Nfc => "nfc",
AuthenticatorTransport.Ble => "ble",
AuthenticatorTransport.Internal => "internal",
_ => value.ToString()
AuthenticatorTransport.Usb => "usb",
AuthenticatorTransport.Nfc => "nfc",
AuthenticatorTransport.Ble => "ble",
AuthenticatorTransport.SmartCard => "smart-card",
AuthenticatorTransport.Hybrid => "hybrid",
AuthenticatorTransport.Internal => "internal",
_ => value.ToString()
};
#pragma warning restore format
}
Expand Down
13 changes: 13 additions & 0 deletions Src/Fido2.Models/Objects/AuthenticatorTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ public enum AuthenticatorTransport
[EnumMember(Value = "ble")]
Ble,

/// <summary>
/// Indicates the respective authenticator can be contacted over over ISO/IEC 7816 smart card with contacts.
/// </summary>
[EnumMember(Value = "smart-card")]
SmartCard,

/// <summary>
/// Indicates the respective authenticator can be contacted using a combination of (often separate) data-transport
/// and proximity mechanisms. This supports, for example, authentication on a desktop computer using a smartphone.
/// </summary>
[EnumMember(Value = "hybrid")]
Hybrid,

/// <summary>
/// Indicates the respective authenticator is contacted using a client device-specific transport, i.e., it is a platform authenticator.
/// These authenticators are not removable from the client device.
Expand Down

0 comments on commit eb312de

Please sign in to comment.