Files
server/src/Core/Models/TwoFactorProvider.cs

28 lines
1.0 KiB
C#
Raw Normal View History

2017-06-22 09:09:51 -04:00
using System;
using System.Collections.Generic;
2017-06-22 17:03:35 -04:00
using u2flib.Util;
namespace Bit.Core.Models
{
public class TwoFactorProvider
{
public bool Enabled { get; set; }
2017-06-21 21:46:52 -04:00
public Dictionary<string, object> MetaData { get; set; } = new Dictionary<string, object>();
public class U2fMetaData
{
public string KeyHandle { get; set; }
2017-06-22 09:09:51 -04:00
public byte[] KeyHandleBytes =>
string.IsNullOrWhiteSpace(KeyHandle) ? null : Utils.Base64StringToByteArray(KeyHandle);
2017-06-21 21:46:52 -04:00
public string PublicKey { get; set; }
2017-06-22 09:09:51 -04:00
public byte[] PublicKeyBytes =>
string.IsNullOrWhiteSpace(PublicKey) ? null : Utils.Base64StringToByteArray(PublicKey);
2017-06-21 21:46:52 -04:00
public string Certificate { get; set; }
2017-06-22 09:09:51 -04:00
public byte[] CertificateBytes =>
string.IsNullOrWhiteSpace(Certificate) ? null : Utils.Base64StringToByteArray(Certificate);
2017-06-21 22:33:45 -04:00
public uint Counter { get; set; }
2017-06-21 21:46:52 -04:00
public bool Compromised { get; set; }
}
}
}