mirror of
https://github.com/bitwarden/server.git
synced 2025-05-30 15:50:33 -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
|
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 bool TwoFactorEnabled { get; set; }
|
||||||
public TwoFactorProviderType? TwoFactorProvider { get; set; }
|
public TwoFactorProviderType? TwoFactorProvider { get; set; }
|
||||||
public string AuthenticatorKey { get; set; }
|
public string AuthenticatorKey { get; set; }
|
||||||
|
public string TwoFactorProviders { get; set; }
|
||||||
public string TwoFactorRecoveryCode { get; set; }
|
public string TwoFactorRecoveryCode { get; set; }
|
||||||
public string EquivalentDomains { get; set; }
|
public string EquivalentDomains { get; set; }
|
||||||
public string ExcludedGlobalEquivalentDomains { 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,
|
@TwoFactorEnabled BIT,
|
||||||
@TwoFactorProvider TINYINT,
|
@TwoFactorProvider TINYINT,
|
||||||
@AuthenticatorKey NVARCHAR(50),
|
@AuthenticatorKey NVARCHAR(50),
|
||||||
|
@TwoFactorProviders NVARCHAR(MAX),
|
||||||
@TwoFactorRecoveryCode NVARCHAR(32),
|
@TwoFactorRecoveryCode NVARCHAR(32),
|
||||||
@EquivalentDomains NVARCHAR(MAX),
|
@EquivalentDomains NVARCHAR(MAX),
|
||||||
@ExcludedGlobalEquivalentDomains NVARCHAR(MAX),
|
@ExcludedGlobalEquivalentDomains NVARCHAR(MAX),
|
||||||
@ -36,6 +37,7 @@ BEGIN
|
|||||||
[TwoFactorEnabled],
|
[TwoFactorEnabled],
|
||||||
[TwoFactorProvider],
|
[TwoFactorProvider],
|
||||||
[AuthenticatorKey],
|
[AuthenticatorKey],
|
||||||
|
[TwoFactorProviders],
|
||||||
[TwoFactorRecoveryCode],
|
[TwoFactorRecoveryCode],
|
||||||
[EquivalentDomains],
|
[EquivalentDomains],
|
||||||
[ExcludedGlobalEquivalentDomains],
|
[ExcludedGlobalEquivalentDomains],
|
||||||
@ -59,6 +61,7 @@ BEGIN
|
|||||||
@TwoFactorEnabled,
|
@TwoFactorEnabled,
|
||||||
@TwoFactorProvider,
|
@TwoFactorProvider,
|
||||||
@AuthenticatorKey,
|
@AuthenticatorKey,
|
||||||
|
@TwoFactorProviders,
|
||||||
@TwoFactorRecoveryCode,
|
@TwoFactorRecoveryCode,
|
||||||
@EquivalentDomains,
|
@EquivalentDomains,
|
||||||
@ExcludedGlobalEquivalentDomains,
|
@ExcludedGlobalEquivalentDomains,
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
@TwoFactorEnabled BIT,
|
@TwoFactorEnabled BIT,
|
||||||
@TwoFactorProvider TINYINT,
|
@TwoFactorProvider TINYINT,
|
||||||
@AuthenticatorKey NVARCHAR(50),
|
@AuthenticatorKey NVARCHAR(50),
|
||||||
|
@TwoFactorProviders NVARCHAR(MAX),
|
||||||
@TwoFactorRecoveryCode NVARCHAR(32),
|
@TwoFactorRecoveryCode NVARCHAR(32),
|
||||||
@EquivalentDomains NVARCHAR(MAX),
|
@EquivalentDomains NVARCHAR(MAX),
|
||||||
@ExcludedGlobalEquivalentDomains NVARCHAR(MAX),
|
@ExcludedGlobalEquivalentDomains NVARCHAR(MAX),
|
||||||
@ -36,6 +37,7 @@ BEGIN
|
|||||||
[TwoFactorEnabled] = @TwoFactorEnabled,
|
[TwoFactorEnabled] = @TwoFactorEnabled,
|
||||||
[TwoFactorProvider] = @TwoFactorProvider,
|
[TwoFactorProvider] = @TwoFactorProvider,
|
||||||
[AuthenticatorKey] = @AuthenticatorKey,
|
[AuthenticatorKey] = @AuthenticatorKey,
|
||||||
|
[TwoFactorProviders] = @TwoFactorProviders,
|
||||||
[TwoFactorRecoveryCode] = @TwoFactorRecoveryCode,
|
[TwoFactorRecoveryCode] = @TwoFactorRecoveryCode,
|
||||||
[EquivalentDomains] = @EquivalentDomains,
|
[EquivalentDomains] = @EquivalentDomains,
|
||||||
[ExcludedGlobalEquivalentDomains] = @ExcludedGlobalEquivalentDomains,
|
[ExcludedGlobalEquivalentDomains] = @ExcludedGlobalEquivalentDomains,
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
[TwoFactorEnabled] BIT NOT NULL,
|
[TwoFactorEnabled] BIT NOT NULL,
|
||||||
[TwoFactorProvider] TINYINT NULL,
|
[TwoFactorProvider] TINYINT NULL,
|
||||||
[AuthenticatorKey] NVARCHAR (50) NULL,
|
[AuthenticatorKey] NVARCHAR (50) NULL,
|
||||||
|
[TwoFactorProviders] NVARCHAR (MAX) NULL,
|
||||||
[TwoFactorRecoveryCode] NVARCHAR (32) NULL,
|
[TwoFactorRecoveryCode] NVARCHAR (32) NULL,
|
||||||
[EquivalentDomains] NVARCHAR (MAX) NULL,
|
[EquivalentDomains] NVARCHAR (MAX) NULL,
|
||||||
[ExcludedGlobalEquivalentDomains] NVARCHAR (MAX) NULL,
|
[ExcludedGlobalEquivalentDomains] NVARCHAR (MAX) NULL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user