1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

added nfc flag for yubikey config

This commit is contained in:
Kyle Spearrin
2017-06-29 12:34:10 -04:00
parent 205a6d14a6
commit a1008353fd
4 changed files with 25 additions and 7 deletions

View File

@ -92,6 +92,8 @@ namespace Bit.Core.Models.Api
public string Key3 { get; set; }
public string Key4 { get; set; }
public string Key5 { get; set; }
[Required]
public bool? Nfc { get; set; }
public User ToUser(User extistingUser)
{
@ -113,7 +115,8 @@ namespace Bit.Core.Models.Api
["Key2"] = FormatKey(Key2),
["Key3"] = FormatKey(Key3),
["Key4"] = FormatKey(Key4),
["Key5"] = FormatKey(Key5)
["Key5"] = FormatKey(Key5),
["Nfc"] = Nfc.Value
},
Enabled = true
});

View File

@ -39,6 +39,10 @@ namespace Bit.Core.Models.Api
{
Key5 = (string)provider.MetaData["Key5"];
}
if(provider.MetaData.ContainsKey("Nfc"))
{
Nfc = (bool)provider.MetaData["Nfc"];
}
}
else
{
@ -52,5 +56,6 @@ namespace Bit.Core.Models.Api
public string Key3 { get; set; }
public string Key4 { get; set; }
public string Key5 { get; set; }
public bool Nfc { get; set; }
}
}