From 72502154725594cf31878aa944f4bc9d9f3521a3 Mon Sep 17 00:00:00 2001 From: transtrike Date: Tue, 16 Feb 2021 18:07:51 +0200 Subject: UserManager&RoleManager logic moved to Repo; Password hashing and validation moved to Repo and using ASPNET Core hashing methods; Added Migrations; Fixed Roles not added to user --- src/Data/DevHive.Data/Interfaces/IUserRepository.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Data/DevHive.Data/Interfaces') diff --git a/src/Data/DevHive.Data/Interfaces/IUserRepository.cs b/src/Data/DevHive.Data/Interfaces/IUserRepository.cs index 917809d..aec0eb3 100644 --- a/src/Data/DevHive.Data/Interfaces/IUserRepository.cs +++ b/src/Data/DevHive.Data/Interfaces/IUserRepository.cs @@ -8,15 +8,17 @@ namespace DevHive.Data.Interfaces { public interface IUserRepository : IRepository { - //Read + Task AddRoleToUser(User user, string roleName); + Task GetByUsernameAsync(string username); Task UpdateProfilePicture(Guid userId, string pictureUrl); - //Validations + Task VerifyPassword(User user, string password); + Task IsInRoleAsync(User user, string roleName); Task ValidateFriendsCollectionAsync(List usernames); Task DoesEmailExistAsync(string email); Task DoesUserExistAsync(Guid id); Task DoesUsernameExistAsync(string username); - bool DoesUserHaveThisUsername(Guid id, string username); + Task DoesUserHaveThisUsernameAsync(Guid id, string username); } } -- cgit v1.2.3