From 9bdaeca2185140844c5eed417f52d41ac4c35122 Mon Sep 17 00:00:00 2001 From: Tino Hager Date: Wed, 10 Jul 2024 10:59:05 +0200 Subject: [PATCH] Add MfaActive to UserInfo --- src/Nager.Authentication.Abstraction/Models/UserInfo.cs | 2 ++ src/Nager.Authentication/Services/UserManagementService.cs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Nager.Authentication.Abstraction/Models/UserInfo.cs b/src/Nager.Authentication.Abstraction/Models/UserInfo.cs index 2166806..80292b7 100644 --- a/src/Nager.Authentication.Abstraction/Models/UserInfo.cs +++ b/src/Nager.Authentication.Abstraction/Models/UserInfo.cs @@ -17,5 +17,7 @@ public class UserInfo public DateTime? LastFailedValidationTimestamp { get; set; } public DateTime? LastSuccessfulValidationTimestamp { get; set; } + + public bool MfaActive { get; set; } } } diff --git a/src/Nager.Authentication/Services/UserManagementService.cs b/src/Nager.Authentication/Services/UserManagementService.cs index 4bf28dc..ef65fe6 100644 --- a/src/Nager.Authentication/Services/UserManagementService.cs +++ b/src/Nager.Authentication/Services/UserManagementService.cs @@ -42,7 +42,8 @@ private UserInfo MapUserInfo(UserEntity userEntity) Lastname = userEntity.Lastname, Roles = RoleHelper.GetRoles(userEntity.RolesData), LastFailedValidationTimestamp = userEntity.LastFailedValidationTimestamp, - LastSuccessfulValidationTimestamp = userEntity.LastSuccessfulValidationTimestamp + LastSuccessfulValidationTimestamp = userEntity.LastSuccessfulValidationTimestamp, + MfaActive = userEntity.MfaActive }; }