1
0
mirror of https://github.com/bitwarden/server synced 2026-02-26 09:23:28 +00:00
Files
server/src/Core/Auth/Models/ITwoFactorProvidersUser.cs
Todd Martin b5f7f9f6a0 chore(premium): [PM-29186] Remove 2FA user interface from premium method signatures
* Removed 2FA user interface from premium method signatures

* Added some more comments for clarity and small touchups.

* Suggested documentation updates.

---------

Co-authored-by: Patrick Pimentel <ppimentel@bitwarden.com>
2025-12-08 17:54:55 -05:00

26 lines
1.0 KiB
C#

using Bit.Core.Auth.Enums;
using Bit.Core.Services;
namespace Bit.Core.Auth.Models;
/// <summary>
/// An interface representing a user entity that supports two-factor providers
/// </summary>
public interface ITwoFactorProvidersUser
{
string? TwoFactorProviders { get; }
/// <summary>
/// Get the two factor providers for the user. Currently it can be assumed providers are enabled
/// if they exists in the dictionary. When two factor providers are disabled they are removed
/// from the dictionary. <see cref="IUserService.DisableTwoFactorProviderAsync"/>
/// <see cref="IOrganizationService.DisableTwoFactorProviderAsync"/>
/// </summary>
/// <returns>Dictionary of providers with the type enum as the key</returns>
Dictionary<TwoFactorProviderType, TwoFactorProvider>? GetTwoFactorProviders();
/// <summary>
/// The unique `UserId` of the user entity for which there are two-factor providers configured.
/// </summary>
/// <returns>The unique identifier for the user</returns>
Guid? GetUserId();
}