bub fix 🥺
created authorization service interface
This commit is contained in:
parent
41ff1555f8
commit
7bff14a66e
3 changed files with 11 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ public class Program
|
|||
|
||||
builder.Services.AddScoped<IPasswordHasher, Sha256PasswordHasher>();
|
||||
|
||||
builder.Services.AddScoped<AuthorizationService>();
|
||||
builder.Services.AddScoped<IAuthorizationService, AuthorizationService>();
|
||||
|
||||
builder.Services.AddScoped<ISurveyRepository, SurveyRepository>();
|
||||
builder.Services.AddScoped<ISurveyService, SurveyService>();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
using SurveyBackend.Core.Models;
|
||||
|
||||
namespace SurveyBackend.Core.Services;
|
||||
|
||||
public interface IAuthorizationService
|
||||
{
|
||||
public Task<string?> LogInUser(string email, string password);
|
||||
public Task RegisterUser(User user);
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ using SurveyBackend.Services.Helpers;
|
|||
|
||||
namespace SurveyBackend.Services.Services;
|
||||
|
||||
public class AuthorizationService
|
||||
public class AuthorizationService : IAuthorizationService
|
||||
{
|
||||
private readonly IUserService _userService;
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue