2FA for users in management API (#15607)

* Added 2FA management endpoints

* Ensure not found do not lead to forbidden results

* Do not inherit the requirement to have access to users, from the current user base class

* Updated OpenApi.json

* Handle 2FA in login scenario (only backend)

* Added the endpoint to use for client to post 2FA code

* Fixed tests and allow injecting the authentication type settings

* fix test build

* Fallback to use Constants.Security.BackOfficeAuthenticationType

* remove unused variable

* Review fixes

* Build fix

* Update src/Umbraco.Cms.Api.Management/Controllers/User/Current/DisableTwoFactorProviderCurrentUserController.cs

Co-authored-by: Sven Geusens <geusens@gmail.com>

* Handle case where 2fa provider is already setup

---------

Co-authored-by: Sven Geusens <geusens@gmail.com>
This commit is contained in:
Bjarke Berg
2024-01-23 18:07:21 +01:00
committed by GitHub
parent bfb500612a
commit aaca7a5ff4
52 changed files with 1563 additions and 307 deletions

View File

@@ -0,0 +1,8 @@
namespace Umbraco.Cms.Core.Security;
/// <summary>
/// A No-operation implementation of the ISetupTwoFactorModel.
/// </summary>
public class NoopSetupTwoFactorModel : ISetupTwoFactorModel
{
}