mirror of
https://github.com/bitwarden/server
synced 2026-01-02 00:23:40 +00:00
Auth/pm 17111/add browser to list of approving clients (#5792)
* feat(update-auth-approving-clients): [PM-17111] Add Browser to List of Approving Clients - Initial changes. * feat(update-auth-approving-clients): [PM-17111] Add Browser to List of Approving Clients - Updated tests. * test(update-auth-approving-clients): [PM-17111] Add Browser to List of Approving Clients - Strengthened tests.
This commit is contained in:
committed by
GitHub
parent
5700347e08
commit
dd2ea41b74
22
src/Identity/Utilities/LoginApprovingClientTypes.cs
Normal file
22
src/Identity/Utilities/LoginApprovingClientTypes.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Identity.Utilities;
|
||||
|
||||
public static class LoginApprovingClientTypes
|
||||
{
|
||||
private static readonly IReadOnlyCollection<ClientType> _clientTypesThatCanApprove;
|
||||
|
||||
static LoginApprovingClientTypes()
|
||||
{
|
||||
var clientTypes = new List<ClientType>
|
||||
{
|
||||
ClientType.Desktop,
|
||||
ClientType.Mobile,
|
||||
ClientType.Web,
|
||||
ClientType.Browser,
|
||||
};
|
||||
_clientTypesThatCanApprove = clientTypes.AsReadOnly();
|
||||
}
|
||||
|
||||
public static IReadOnlyCollection<ClientType> TypesThatCanApprove => _clientTypesThatCanApprove;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Identity.Utilities;
|
||||
|
||||
public static class LoginApprovingDeviceTypes
|
||||
{
|
||||
private static readonly IReadOnlyCollection<DeviceType> _deviceTypes;
|
||||
|
||||
static LoginApprovingDeviceTypes()
|
||||
{
|
||||
var deviceTypes = new List<DeviceType>();
|
||||
deviceTypes.AddRange(DeviceTypes.DesktopTypes);
|
||||
deviceTypes.AddRange(DeviceTypes.MobileTypes);
|
||||
deviceTypes.AddRange(DeviceTypes.BrowserTypes);
|
||||
_deviceTypes = deviceTypes.AsReadOnly();
|
||||
}
|
||||
|
||||
public static IReadOnlyCollection<DeviceType> Types => _deviceTypes;
|
||||
}
|
||||
Reference in New Issue
Block a user