rework messages

+ addition LocalStorageService
+ tests
This commit is contained in:
Artemy
2025-06-21 14:53:15 +07:00
parent 3f1c050149
commit 7831e4838a
16 changed files with 204 additions and 13 deletions
@@ -1,10 +1,10 @@
using Govor.API.Services.Authentication.Interfaces;
using Govor.Core;
using Govor.Core.Infrastructure.Extensions;
using Govor.Core.Models;
using Govor.Core.Repositories;
using Govor.Core.Repositories.Users;
using Govor.Core.Services;
using Govor.Data.Repositories;
using Govor.API.Services;
namespace Govor.API.Services.Authentication;
@@ -0,0 +1,9 @@
using Govor.Core.Models;
namespace Govor.API.Services.Authentication.Interfaces;
public interface IAccountService
{
public Task<string> RegistrationAsync(string name, string password);
public Task<string> LoginAsync(string name, string password);
}
@@ -0,0 +1,8 @@
using Govor.Core.Models;
namespace Govor.API.Services.Authentication.Interfaces;
public interface IJwtService
{
string GenerateJwtToken(User user);
}
@@ -1,8 +1,8 @@
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text;
using Govor.API.Services.Authentication.Interfaces;
using Govor.Core.Models;
using Govor.Core.Services;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Tokens;