diff --git a/src/Nager.Authentication.Abstraction/Entities/UserEntity.cs b/src/Nager.Authentication.Abstraction/Entities/UserEntity.cs
index 12cd10c..03121bc 100644
--- a/src/Nager.Authentication.Abstraction/Entities/UserEntity.cs
+++ b/src/Nager.Authentication.Abstraction/Entities/UserEntity.cs
@@ -26,8 +26,8 @@ public class UserEntity
[MaxLength(32)]
public byte[]? PasswordHash { get; set; }
- public DateTime LastValidationTimestamp { get; set; }
+ public DateTime? LastFailedValidationTimestamp { get; set; }
- public DateTime LastSuccessfulValidationTimestamp { get; set; }
+ public DateTime? LastSuccessfulValidationTimestamp { get; set; }
}
}
diff --git a/src/Nager.Authentication.Abstraction/Models/UserInfo.cs b/src/Nager.Authentication.Abstraction/Models/UserInfo.cs
index f658e78..2166806 100644
--- a/src/Nager.Authentication.Abstraction/Models/UserInfo.cs
+++ b/src/Nager.Authentication.Abstraction/Models/UserInfo.cs
@@ -14,8 +14,8 @@ public class UserInfo
public string? Lastname { get; set; }
- public DateTime LastValidationTimestamp { get; set; }
+ public DateTime? LastFailedValidationTimestamp { get; set; }
- public DateTime LastSuccessfulValidationTimestamp { get; set; }
+ public DateTime? LastSuccessfulValidationTimestamp { get; set; }
}
}
diff --git a/src/Nager.Authentication.Abstraction/Nager.Authentication.Abstraction.csproj b/src/Nager.Authentication.Abstraction/Nager.Authentication.Abstraction.csproj
index 6229389..90929c9 100644
--- a/src/Nager.Authentication.Abstraction/Nager.Authentication.Abstraction.csproj
+++ b/src/Nager.Authentication.Abstraction/Nager.Authentication.Abstraction.csproj
@@ -20,7 +20,7 @@
enable
netstandard2.1
- 1.1.0
+ 1.2.0
diff --git a/src/Nager.Authentication.AspNet/Controllers/UserManagementController.cs b/src/Nager.Authentication.AspNet/Controllers/UserManagementController.cs
index 19c1318..7b808df 100644
--- a/src/Nager.Authentication.AspNet/Controllers/UserManagementController.cs
+++ b/src/Nager.Authentication.AspNet/Controllers/UserManagementController.cs
@@ -64,7 +64,7 @@ public async Task> GetUserAsync(
Firstname = userInfo.Firstname,
Lastname = userInfo.Lastname,
Roles = userInfo.Roles,
- LastValidationTimestamp = userInfo.LastValidationTimestamp,
+ LastFailedValidationTimestamp = userInfo.LastFailedValidationTimestamp,
LastSuccessfulValidationTimestamp = userInfo.LastSuccessfulValidationTimestamp
};
@@ -93,7 +93,7 @@ public async Task> QueryUsersAsync(
Firstname = userInfo.Firstname,
Lastname = userInfo.Lastname,
Roles = userInfo.Roles,
- LastValidationTimestamp = userInfo.LastValidationTimestamp,
+ LastFailedValidationTimestamp = userInfo.LastFailedValidationTimestamp,
LastSuccessfulValidationTimestamp = userInfo.LastSuccessfulValidationTimestamp
});
diff --git a/src/Nager.Authentication.AspNet/Dtos/UserInfoDto.cs b/src/Nager.Authentication.AspNet/Dtos/UserInfoDto.cs
index 8a13167..c3c08f7 100644
--- a/src/Nager.Authentication.AspNet/Dtos/UserInfoDto.cs
+++ b/src/Nager.Authentication.AspNet/Dtos/UserInfoDto.cs
@@ -14,8 +14,8 @@ public class UserInfoDto
public string Lastname { get; set; }
- public DateTime LastValidationTimestamp { get; set; }
+ public DateTime? LastFailedValidationTimestamp { get; set; }
- public DateTime LastSuccessfulValidationTimestamp { get; set; }
+ public DateTime? LastSuccessfulValidationTimestamp { get; set; }
}
}
diff --git a/src/Nager.Authentication.AspNet/Nager.Authentication.AspNet.csproj b/src/Nager.Authentication.AspNet/Nager.Authentication.AspNet.csproj
index 94cf18b..c31418c 100644
--- a/src/Nager.Authentication.AspNet/Nager.Authentication.AspNet.csproj
+++ b/src/Nager.Authentication.AspNet/Nager.Authentication.AspNet.csproj
@@ -18,7 +18,7 @@
net8.0;net7.0;net6.0
enable
- 1.1.2
+ 1.2.0
diff --git a/src/Nager.Authentication.InMemoryRepository/InMemoryUserRepository.cs b/src/Nager.Authentication.InMemoryRepository/InMemoryUserRepository.cs
index 9ec4d4f..a255cf3 100644
--- a/src/Nager.Authentication.InMemoryRepository/InMemoryUserRepository.cs
+++ b/src/Nager.Authentication.InMemoryRepository/InMemoryUserRepository.cs
@@ -96,7 +96,7 @@ public Task SetLastValidationTimestampAsync(
return Task.FromResult(false);
}
- item.LastValidationTimestamp = DateTime.UtcNow;
+ item.LastFailedValidationTimestamp = DateTime.UtcNow;
return Task.FromResult(true);
}
diff --git a/src/Nager.Authentication.UnitTest/RoleHelperTest.cs b/src/Nager.Authentication.UnitTest/RoleHelperTest.cs
index 04e1ddf..f8e0ccd 100644
--- a/src/Nager.Authentication.UnitTest/RoleHelperTest.cs
+++ b/src/Nager.Authentication.UnitTest/RoleHelperTest.cs
@@ -8,7 +8,7 @@ namespace Nager.Authentication.UnitTest
public class RoleHelperTest
{
[TestMethod]
- public async Task AddRoleToRoleData_RoleDataNull_Successful()
+ public void AddRoleToRoleData_RoleDataNull_Successful()
{
var roleData = RoleHelper.AddRoleToRoleData(null, "test");
@@ -16,7 +16,7 @@ public async Task AddRoleToRoleData_RoleDataNull_Successful()
}
[TestMethod]
- public async Task AddRoleToRoleData_RoleDataStringEmpty_Successful()
+ public void AddRoleToRoleData_RoleDataStringEmpty_Successful()
{
var roleData = RoleHelper.AddRoleToRoleData(string.Empty, "test");
@@ -24,7 +24,7 @@ public async Task AddRoleToRoleData_RoleDataStringEmpty_Successful()
}
[TestMethod]
- public async Task AddRoleToRoleData_DuplicateRoleTest_Successful()
+ public void AddRoleToRoleData_DuplicateRoleTest_Successful()
{
var roleData = RoleHelper.AddRoleToRoleData("test", "test");
@@ -32,7 +32,7 @@ public async Task AddRoleToRoleData_DuplicateRoleTest_Successful()
}
[TestMethod]
- public async Task AddRoleToRoleData_DuplicateRoleTestPascalCase_Successful()
+ public void AddRoleToRoleData_DuplicateRoleTestPascalCase_Successful()
{
var roleData = RoleHelper.AddRoleToRoleData("test", "Test");
diff --git a/src/Nager.Authentication/Nager.Authentication.csproj b/src/Nager.Authentication/Nager.Authentication.csproj
index 99af7a5..5e04b8b 100644
--- a/src/Nager.Authentication/Nager.Authentication.csproj
+++ b/src/Nager.Authentication/Nager.Authentication.csproj
@@ -20,7 +20,7 @@
enable
net8.0;net7.0;net6.0
- 1.1.2
+ 1.2.0
diff --git a/src/Nager.Authentication/Services/UserManagementService.cs b/src/Nager.Authentication/Services/UserManagementService.cs
index 80c74cb..4736c41 100644
--- a/src/Nager.Authentication/Services/UserManagementService.cs
+++ b/src/Nager.Authentication/Services/UserManagementService.cs
@@ -33,7 +33,7 @@ private UserInfo MapUserInfo(UserEntity userEntity)
Firstname = userEntity.Firstname,
Lastname = userEntity.Lastname,
Roles = RoleHelper.GetRoles(userEntity.RolesData),
- LastValidationTimestamp = userEntity.LastValidationTimestamp,
+ LastFailedValidationTimestamp = userEntity.LastFailedValidationTimestamp,
LastSuccessfulValidationTimestamp = userEntity.LastSuccessfulValidationTimestamp
};
}