mirror of
https://github.com/bitwarden/server.git
synced 2025-05-27 22:34:54 -05:00
added two factor providers to user object
This commit is contained in:
parent
7b1c0d6df1
commit
811bbbfe0a
@ -2,6 +2,9 @@
|
||||
{
|
||||
public enum TwoFactorProviderType : byte
|
||||
{
|
||||
Authenticator = 0
|
||||
Authenticator = 0,
|
||||
Email = 1,
|
||||
Duo = 2,
|
||||
YubiKey = 3
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ namespace Bit.Core.Models.Table
|
||||
public bool TwoFactorEnabled { get; set; }
|
||||
public TwoFactorProviderType? TwoFactorProvider { get; set; }
|
||||
public string AuthenticatorKey { get; set; }
|
||||
public string TwoFactorProviders { get; set; }
|
||||
public string TwoFactorRecoveryCode { get; set; }
|
||||
public string EquivalentDomains { get; set; }
|
||||
public string ExcludedGlobalEquivalentDomains { get; set; }
|
||||
|
12
src/Core/Models/TwoFactorProvider.cs
Normal file
12
src/Core/Models/TwoFactorProvider.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using Bit.Core.Enums;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bit.Core.Models
|
||||
{
|
||||
public class TwoFactorProvider
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public bool Remember { get; set; }
|
||||
public Dictionary<string, object> MetaData { get; set; }
|
||||
}
|
||||
}
|
@ -10,6 +10,7 @@
|
||||
@TwoFactorEnabled BIT,
|
||||
@TwoFactorProvider TINYINT,
|
||||
@AuthenticatorKey NVARCHAR(50),
|
||||
@TwoFactorProviders NVARCHAR(MAX),
|
||||
@TwoFactorRecoveryCode NVARCHAR(32),
|
||||
@EquivalentDomains NVARCHAR(MAX),
|
||||
@ExcludedGlobalEquivalentDomains NVARCHAR(MAX),
|
||||
@ -36,6 +37,7 @@ BEGIN
|
||||
[TwoFactorEnabled],
|
||||
[TwoFactorProvider],
|
||||
[AuthenticatorKey],
|
||||
[TwoFactorProviders],
|
||||
[TwoFactorRecoveryCode],
|
||||
[EquivalentDomains],
|
||||
[ExcludedGlobalEquivalentDomains],
|
||||
@ -59,6 +61,7 @@ BEGIN
|
||||
@TwoFactorEnabled,
|
||||
@TwoFactorProvider,
|
||||
@AuthenticatorKey,
|
||||
@TwoFactorProviders,
|
||||
@TwoFactorRecoveryCode,
|
||||
@EquivalentDomains,
|
||||
@ExcludedGlobalEquivalentDomains,
|
||||
|
@ -10,6 +10,7 @@
|
||||
@TwoFactorEnabled BIT,
|
||||
@TwoFactorProvider TINYINT,
|
||||
@AuthenticatorKey NVARCHAR(50),
|
||||
@TwoFactorProviders NVARCHAR(MAX),
|
||||
@TwoFactorRecoveryCode NVARCHAR(32),
|
||||
@EquivalentDomains NVARCHAR(MAX),
|
||||
@ExcludedGlobalEquivalentDomains NVARCHAR(MAX),
|
||||
@ -36,6 +37,7 @@ BEGIN
|
||||
[TwoFactorEnabled] = @TwoFactorEnabled,
|
||||
[TwoFactorProvider] = @TwoFactorProvider,
|
||||
[AuthenticatorKey] = @AuthenticatorKey,
|
||||
[TwoFactorProviders] = @TwoFactorProviders,
|
||||
[TwoFactorRecoveryCode] = @TwoFactorRecoveryCode,
|
||||
[EquivalentDomains] = @EquivalentDomains,
|
||||
[ExcludedGlobalEquivalentDomains] = @ExcludedGlobalEquivalentDomains,
|
||||
|
@ -10,6 +10,7 @@
|
||||
[TwoFactorEnabled] BIT NOT NULL,
|
||||
[TwoFactorProvider] TINYINT NULL,
|
||||
[AuthenticatorKey] NVARCHAR (50) NULL,
|
||||
[TwoFactorProviders] NVARCHAR (MAX) NULL,
|
||||
[TwoFactorRecoveryCode] NVARCHAR (32) NULL,
|
||||
[EquivalentDomains] NVARCHAR (MAX) NULL,
|
||||
[ExcludedGlobalEquivalentDomains] NVARCHAR (MAX) NULL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user