diff --git a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/AuthService/EfAuthService.cs b/dotnet/AipsCore/Infrastructure/Authentication/AuthService/EfAuthService.cs similarity index 91% rename from dotnet/AipsCore/Infrastructure/Persistence/Authentication/AuthService/EfAuthService.cs rename to dotnet/AipsCore/Infrastructure/Authentication/AuthService/EfAuthService.cs index 996be94..84f6c74 100644 --- a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/AuthService/EfAuthService.cs +++ b/dotnet/AipsCore/Infrastructure/Authentication/AuthService/EfAuthService.cs @@ -5,16 +5,15 @@ using AipsCore.Domain.Models.User.Validation; using AipsCore.Infrastructure.Persistence.Db; using AipsCore.Infrastructure.Persistence.User.Mappers; using Microsoft.AspNetCore.Identity; -using Microsoft.EntityFrameworkCore; -namespace AipsCore.Infrastructure.Persistence.Authentication.AuthService; +namespace AipsCore.Infrastructure.Authentication.AuthService; public class EfAuthService : IAuthService { private readonly AipsDbContext _dbContext; - private readonly UserManager _userManager; + private readonly UserManager _userManager; - public EfAuthService(AipsDbContext dbContext, UserManager userManager) + public EfAuthService(AipsDbContext dbContext, UserManager userManager) { _dbContext = dbContext; _userManager = userManager; diff --git a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/Jwt/JwtSettings.cs b/dotnet/AipsCore/Infrastructure/Authentication/Jwt/JwtSettings.cs similarity index 81% rename from dotnet/AipsCore/Infrastructure/Persistence/Authentication/Jwt/JwtSettings.cs rename to dotnet/AipsCore/Infrastructure/Authentication/Jwt/JwtSettings.cs index a2a8bc0..42c6df6 100644 --- a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/Jwt/JwtSettings.cs +++ b/dotnet/AipsCore/Infrastructure/Authentication/Jwt/JwtSettings.cs @@ -1,4 +1,4 @@ -namespace AipsCore.Infrastructure.Persistence.Authentication.Jwt; +namespace AipsCore.Infrastructure.Authentication.Jwt; public sealed class JwtSettings { diff --git a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/Jwt/JwtTokenProvider.cs b/dotnet/AipsCore/Infrastructure/Authentication/Jwt/JwtTokenProvider.cs similarity index 95% rename from dotnet/AipsCore/Infrastructure/Persistence/Authentication/Jwt/JwtTokenProvider.cs rename to dotnet/AipsCore/Infrastructure/Authentication/Jwt/JwtTokenProvider.cs index 62b3840..2539910 100644 --- a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/Jwt/JwtTokenProvider.cs +++ b/dotnet/AipsCore/Infrastructure/Authentication/Jwt/JwtTokenProvider.cs @@ -6,7 +6,7 @@ using AipsCore.Application.Abstract.UserContext; using AipsCore.Domain.Models.User.External; using Microsoft.IdentityModel.Tokens; -namespace AipsCore.Infrastructure.Persistence.Authentication.Jwt; +namespace AipsCore.Infrastructure.Authentication.Jwt; public class JwtTokenProvider : ITokenProvider { diff --git a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/UserContext/HttpUserContext.cs b/dotnet/AipsCore/Infrastructure/Authentication/UserContext/HttpUserContext.cs similarity index 92% rename from dotnet/AipsCore/Infrastructure/Persistence/Authentication/UserContext/HttpUserContext.cs rename to dotnet/AipsCore/Infrastructure/Authentication/UserContext/HttpUserContext.cs index f29bdaf..c8eb474 100644 --- a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/UserContext/HttpUserContext.cs +++ b/dotnet/AipsCore/Infrastructure/Authentication/UserContext/HttpUserContext.cs @@ -3,7 +3,7 @@ using AipsCore.Application.Abstract.UserContext; using AipsCore.Domain.Models.User.ValueObjects; using Microsoft.AspNetCore.Http; -namespace AipsCore.Infrastructure.Persistence.Authentication.UserContext; +namespace AipsCore.Infrastructure.Authentication.UserContext; public class HttpUserContext : IUserContext { diff --git a/dotnet/AipsCore/Infrastructure/DI/PersistenceRegistrationExtensions.cs b/dotnet/AipsCore/Infrastructure/DI/PersistenceRegistrationExtensions.cs index f0ab840..f442a23 100644 --- a/dotnet/AipsCore/Infrastructure/DI/PersistenceRegistrationExtensions.cs +++ b/dotnet/AipsCore/Infrastructure/DI/PersistenceRegistrationExtensions.cs @@ -5,8 +5,8 @@ using AipsCore.Domain.Models.User.External; using AipsCore.Domain.Models.Whiteboard.External; using AipsCore.Domain.Models.WhiteboardMembership.External; using AipsCore.Infrastructure.DI.Configuration; -using AipsCore.Infrastructure.Persistence.Authentication.RefreshToken; using AipsCore.Infrastructure.Persistence.Db; +using AipsCore.Infrastructure.Persistence.RefreshToken; using AipsCore.Infrastructure.Persistence.Shape; using AipsCore.Infrastructure.Persistence.User; using AipsCore.Infrastructure.Persistence.Whiteboard; diff --git a/dotnet/AipsCore/Infrastructure/DI/UserContextRegistrationExtension.cs b/dotnet/AipsCore/Infrastructure/DI/UserContextRegistrationExtension.cs index 96ac203..12bc813 100644 --- a/dotnet/AipsCore/Infrastructure/DI/UserContextRegistrationExtension.cs +++ b/dotnet/AipsCore/Infrastructure/DI/UserContextRegistrationExtension.cs @@ -2,11 +2,10 @@ using System.Text; using AipsCore.Application.Abstract.UserContext; using AipsCore.Application.Common.Authentication; using AipsCore.Domain.Models.User.Options; +using AipsCore.Infrastructure.Authentication.AuthService; +using AipsCore.Infrastructure.Authentication.Jwt; +using AipsCore.Infrastructure.Authentication.UserContext; using AipsCore.Infrastructure.DI.Configuration; -using AipsCore.Infrastructure.Persistence.Authentication; -using AipsCore.Infrastructure.Persistence.Authentication.AuthService; -using AipsCore.Infrastructure.Persistence.Authentication.Jwt; -using AipsCore.Infrastructure.Persistence.Authentication.UserContext; using AipsCore.Infrastructure.Persistence.Db; using AipsCore.Infrastructure.Persistence.User; using Microsoft.AspNetCore.Authentication.JwtBearer; diff --git a/dotnet/AipsCore/Infrastructure/Persistence/Db/AipsDbContext.cs b/dotnet/AipsCore/Infrastructure/Persistence/Db/AipsDbContext.cs index ce13ff9..a71f367 100644 --- a/dotnet/AipsCore/Infrastructure/Persistence/Db/AipsDbContext.cs +++ b/dotnet/AipsCore/Infrastructure/Persistence/Db/AipsDbContext.cs @@ -1,5 +1,4 @@ -using AipsCore.Infrastructure.Persistence.Authentication.RefreshToken; -using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; @@ -7,7 +6,7 @@ namespace AipsCore.Infrastructure.Persistence.Db; public class AipsDbContext : IdentityDbContext, Guid> { - public DbSet RefreshTokens { get; set; } + public DbSet RefreshTokens { get; set; } public DbSet Whiteboards { get; set; } public DbSet Shapes { get; set; } diff --git a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshToken.cs b/dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshToken.cs similarity index 82% rename from dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshToken.cs rename to dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshToken.cs index 7cce862..a762b50 100644 --- a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshToken.cs +++ b/dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshToken.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace AipsCore.Infrastructure.Persistence.Authentication.RefreshToken; +namespace AipsCore.Infrastructure.Persistence.RefreshToken; public class RefreshToken { diff --git a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshTokenException.cs b/dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshTokenException.cs similarity index 85% rename from dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshTokenException.cs rename to dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshTokenException.cs index 7d648e2..10ab30c 100644 --- a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshTokenException.cs +++ b/dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshTokenException.cs @@ -1,4 +1,4 @@ -namespace AipsCore.Infrastructure.Persistence.Authentication.RefreshToken; +namespace AipsCore.Infrastructure.Persistence.RefreshToken; public class RefreshTokenException : Exception { diff --git a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshTokenMappers.cs b/dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshTokenMappers.cs similarity index 68% rename from dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshTokenMappers.cs rename to dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshTokenMappers.cs index cad3d2c..13b1774 100644 --- a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshTokenMappers.cs +++ b/dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshTokenMappers.cs @@ -1,8 +1,8 @@ -namespace AipsCore.Infrastructure.Persistence.Authentication.RefreshToken; +namespace AipsCore.Infrastructure.Persistence.RefreshToken; public static class RefreshTokenMappers { - public static Application.Common.Authentication.Models.RefreshToken MapToModel(this RefreshToken entity) + public static Application.Common.Authentication.Models.RefreshToken MapToModel(this Persistence.RefreshToken.RefreshToken entity) { return new Application.Common.Authentication.Models.RefreshToken( entity.Token, diff --git a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshTokenRepository.cs b/dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshTokenRepository.cs similarity index 91% rename from dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshTokenRepository.cs rename to dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshTokenRepository.cs index 0fc3880..30d73e2 100644 --- a/dotnet/AipsCore/Infrastructure/Persistence/Authentication/RefreshToken/RefreshTokenRepository.cs +++ b/dotnet/AipsCore/Infrastructure/Persistence/RefreshToken/RefreshTokenRepository.cs @@ -1,10 +1,10 @@ using AipsCore.Application.Abstract.UserContext; using AipsCore.Domain.Models.User.ValueObjects; -using AipsCore.Infrastructure.Persistence.Authentication.Jwt; +using AipsCore.Infrastructure.Authentication.Jwt; using AipsCore.Infrastructure.Persistence.Db; using Microsoft.EntityFrameworkCore; -namespace AipsCore.Infrastructure.Persistence.Authentication.RefreshToken; +namespace AipsCore.Infrastructure.Persistence.RefreshToken; public class RefreshTokenRepository : IRefreshTokenRepository { @@ -20,7 +20,7 @@ public class RefreshTokenRepository : IRefreshTokenRepository public async Task AddAsync(string token, UserId userId, CancellationToken cancellationToken = default) { - var refreshToken = new RefreshToken() + var refreshToken = new Persistence.RefreshToken.RefreshToken() { Id = Guid.NewGuid(), Token = token,