From 727f5c276e4691777e10ce4909f6f4755cafd1fb Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Sat, 2 Nov 2024 23:34:23 +0300 Subject: [PATCH] refactor: move files --- Security/Common/Domain/{ => Caching}/AuthToken.cs | 2 +- Security/Common/Domain/{ => Caching}/FirstAuthToken.cs | 2 +- Security/Common/Domain/TwoFactorAuthenticator.cs | 7 +++++++ Security/Common/Domain/User.cs | 6 ------ Security/Services/AuthService.cs | 1 + 5 files changed, 10 insertions(+), 8 deletions(-) rename Security/Common/Domain/{ => Caching}/AuthToken.cs (92%) rename Security/Common/Domain/{ => Caching}/FirstAuthToken.cs (90%) create mode 100644 Security/Common/Domain/TwoFactorAuthenticator.cs diff --git a/Security/Common/Domain/AuthToken.cs b/Security/Common/Domain/Caching/AuthToken.cs similarity index 92% rename from Security/Common/Domain/AuthToken.cs rename to Security/Common/Domain/Caching/AuthToken.cs index ff78786..33c2bb6 100644 --- a/Security/Common/Domain/AuthToken.cs +++ b/Security/Common/Domain/Caching/AuthToken.cs @@ -1,6 +1,6 @@ using System; -namespace Mirea.Api.Security.Common.Domain; +namespace Mirea.Api.Security.Common.Domain.Caching; internal class AuthToken { diff --git a/Security/Common/Domain/FirstAuthToken.cs b/Security/Common/Domain/Caching/FirstAuthToken.cs similarity index 90% rename from Security/Common/Domain/FirstAuthToken.cs rename to Security/Common/Domain/Caching/FirstAuthToken.cs index 29f229d..2181ce3 100644 --- a/Security/Common/Domain/FirstAuthToken.cs +++ b/Security/Common/Domain/Caching/FirstAuthToken.cs @@ -1,4 +1,4 @@ -namespace Mirea.Api.Security.Common.Domain; +namespace Mirea.Api.Security.Common.Domain.Caching; internal class FirstAuthToken { diff --git a/Security/Common/Domain/TwoFactorAuthenticator.cs b/Security/Common/Domain/TwoFactorAuthenticator.cs new file mode 100644 index 0000000..1a30b28 --- /dev/null +++ b/Security/Common/Domain/TwoFactorAuthenticator.cs @@ -0,0 +1,7 @@ +namespace Mirea.Api.Security.Common.Domain; + +public enum TwoFactorAuthenticator +{ + None, + Totp +} \ No newline at end of file diff --git a/Security/Common/Domain/User.cs b/Security/Common/Domain/User.cs index 2dafb97..27ea522 100644 --- a/Security/Common/Domain/User.cs +++ b/Security/Common/Domain/User.cs @@ -1,11 +1,5 @@ namespace Mirea.Api.Security.Common.Domain; -public enum TwoFactorAuthenticator -{ - None, - Totp -} - public class User { public required string Id { get; set; } diff --git a/Security/Services/AuthService.cs b/Security/Services/AuthService.cs index 47f3a46..cb50c5b 100644 --- a/Security/Services/AuthService.cs +++ b/Security/Services/AuthService.cs @@ -2,6 +2,7 @@ using Microsoft.Extensions.Logging; using Mirea.Api.Security.Common; using Mirea.Api.Security.Common.Domain; +using Mirea.Api.Security.Common.Domain.Caching; using Mirea.Api.Security.Common.Interfaces; using System; using System.Security;