mirror of
https://github.com/bitwarden/server
synced 2025-12-16 08:13:33 +00:00
premium checks on 2fa providers
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
using Bit.Core.Enums;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using U2F.Core.Utils;
|
||||
@@ -38,5 +39,18 @@ namespace Bit.Core.Models
|
||||
public uint Counter { get; set; }
|
||||
public bool Compromised { get; set; }
|
||||
}
|
||||
|
||||
public static bool RequiresPremium(TwoFactorProviderType type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case TwoFactorProviderType.Duo:
|
||||
case TwoFactorProviderType.YubiKey:
|
||||
case TwoFactorProviderType.U2f:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user