registration and authorization
This commit is contained in:
parent
2b5f468b84
commit
4423dc360f
12 changed files with 136 additions and 6 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@ namespace SurveyBackend.Core.Repositories;
|
|||
|
||||
public interface IUserRepository : IGenericRepository<User>
|
||||
{
|
||||
public Task<User?> GetUserByEmail(string email);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace SurveyBackend.Core.Services;
|
||||
|
||||
public interface IPasswordHasher
|
||||
{
|
||||
public string HashPassword(string password);
|
||||
public bool Verify(string password, string hashedPassword);
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue