mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 09:02:48 -05:00
[PS-589] Fix emergency contact takeover device verification and endpoints for its settings (#2016)
* Added UnknownDeviceVerificationEnabled on User that is turned off when emergency contact takes over the account. Also added endpoints to get and update 2fa device verification settings. And Updated migrations & tests * Applied dotnet format * Fixed method rename call on TwoFactorController * PS-589 Format fixes * PS-589 changed UnknownDeviceVerificationEnabled to be non-nullable
This commit is contained in:

committed by
GitHub

parent
16c6b23a27
commit
b070e9a387
15
src/Core/Utilities/ClaimsExtensions.cs
Normal file
15
src/Core/Utilities/ClaimsExtensions.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
public static class ClaimsExtensions
|
||||
{
|
||||
public static bool HasSsoIdP(this IEnumerable<Claim> claims)
|
||||
{
|
||||
return claims.Any(c => c.Type == "idp" && c.Value == "sso");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user