From 1f01c06185bf6345d3f22531d2e7a8ae0a7d0cde Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Thu, 14 Jul 2022 12:57:57 +0300 Subject: [PATCH] Tfa: added tfaappwithlink --- web/ASC.Web.Api/Api/Settings/TfaappController.cs | 11 +++++++++++ web/ASC.Web.Core/CookiesManager.cs | 2 -- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/web/ASC.Web.Api/Api/Settings/TfaappController.cs b/web/ASC.Web.Api/Api/Settings/TfaappController.cs index df1941ee16..66a6f97ada 100644 --- a/web/ASC.Web.Api/Api/Settings/TfaappController.cs +++ b/web/ASC.Web.Api/Api/Settings/TfaappController.cs @@ -235,6 +235,17 @@ public class TfaappController : BaseSettingsController return result; } + [HttpPut("tfaappwithlink")] + public async Task TfaSettingsLink(TfaRequestsDto inDto) + { + if (await TfaSettings(inDto)) + { + return TfaConfirmUrl(); + } + + return string.Empty; + } + [HttpGet("tfaapp/setup")] [Authorize(AuthenticationSchemes = "confirm", Roles = "TfaActivation")] public SetupCode TfaAppGenerateSetupCode() diff --git a/web/ASC.Web.Core/CookiesManager.cs b/web/ASC.Web.Core/CookiesManager.cs index c60d3e6ad6..fdb6e1ebb2 100644 --- a/web/ASC.Web.Core/CookiesManager.cs +++ b/web/ASC.Web.Core/CookiesManager.cs @@ -261,8 +261,6 @@ public class CookiesManager _tenantCookieSettingsHelper.SetForTenant(tenant.Id, settings); await _dbLoginEventsManager.LogOutAllActiveConnectionsForTenant(tenant.Id); - - AuthenticateMeAndSetCookies(tenant.Id, _securityContext.CurrentAccount.ID, MessageAction.LoginSuccess); } public string AuthenticateMeAndSetCookies(int tenantId, Guid userId, MessageAction action, bool session = false)