mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Update root namespaces
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
using Domain.Core.Entities;
|
||||
using Infrastructure.PasswordHashing;
|
||||
using Repository.Core.Repositories.Auth;
|
||||
using Service.Core.Password;
|
||||
|
||||
namespace Service.Core.Auth;
|
||||
|
||||
public class AuthService(
|
||||
IAuthRepository authRepo,
|
||||
IPasswordService passwordService
|
||||
IPasswordInfra passwordInfra
|
||||
) : IAuthService
|
||||
{
|
||||
public async Task<UserAccount> RegisterAsync(UserAccount userAccount, string password)
|
||||
@@ -19,7 +19,7 @@ public class AuthService(
|
||||
}
|
||||
|
||||
// password hashing
|
||||
var hashed = passwordService.Hash(password);
|
||||
var hashed = passwordInfra.Hash(password);
|
||||
|
||||
// Register user with hashed password
|
||||
return await authRepo.RegisterUserAsync(
|
||||
@@ -43,6 +43,6 @@ public class AuthService(
|
||||
var activeCred = await authRepo.GetActiveCredentialByUserAccountIdAsync(user.UserAccountId);
|
||||
|
||||
if (activeCred is null) return null;
|
||||
return !passwordService.Verify(password, activeCred.Hash) ? null : user;
|
||||
return !passwordInfra.Verify(password, activeCred.Hash) ? null : user;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user