source: iknow-api/Repository/Interface/IUserRepository.cs@ 5b42c8d

Last change on this file since 5b42c8d was 5b42c8d, checked in by stefansaveski <stefansaveski19@…>, 11 months ago

Implement JWT Authentication and Update User Schema

Replaced repository interface with FinXaccesApi.Repositories in UsersControllers.cs. Updated database schema to use PasswordHash instead of Password. Added new migration files reflecting these changes. Updated service registration in Program.cs to include IAuthService and IUserRepository. Refactored UserRepository.cs and IUserRepository.cs with new methods and namespace changes. Commented out UserService.cs. Updated appsettings with new connection strings and JWT settings. Added BCrypt.Net-Next and System.IdentityModel.Tokens.Jwt packages. Introduced AuthController, UserDTO, AuthService, and IAuthService for handling authentication and user management.

  • Property mode set to 100644
File size: 309 bytes
Line 
1using iknow_api.Core.Models;
2namespace FinXaccesApi.Repositories
3{
4 public interface IUserRepository
5 {
6 Task<bool> UserExistsAsync(string username);
7 Task<User?> GetUserByUsernameAsync(string username);
8 Task AddUserAsync(User user);
9 Task<int> GetUsersCountAsync();
10 }
11}
Note: See TracBrowser for help on using the repository browser.