registration and authorization

This commit is contained in:
Вячеслав 2025-04-17 01:06:08 +05:00
parent 2b5f468b84
commit 4423dc360f
12 changed files with 136 additions and 6 deletions

View file

@ -4,7 +4,7 @@ namespace SurveyBackend.Core.Models;
public class User
{
public string Id { get; set; }
public int Id { get; set; }
public string Email { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }

View file

@ -4,4 +4,5 @@ namespace SurveyBackend.Core.Repositories;
public interface IUserRepository : IGenericRepository<User>
{
public Task<User?> GetUserByEmail(string email);
}

View file

@ -0,0 +1,7 @@
namespace SurveyBackend.Core.Services;
public interface IPasswordHasher
{
public string HashPassword(string password);
public bool Verify(string password, string hashedPassword);
}

View file

@ -1,6 +1,9 @@
using SurveyBackend.Core.Models;
namespace SurveyBackend.Core.Services;
public interface IUserService
{
public Task<User?> GetUserByEmail(string email);
public Task CreateUserAsync(User user);
}