diff options
| author | transtrike <transtrike@gmail.com> | 2021-02-16 18:07:51 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-02-16 18:07:51 +0200 |
| commit | 72502154725594cf31878aa944f4bc9d9f3521a3 (patch) | |
| tree | 6ea1f475f35fba320b32664084d4c39e2d084e49 /src/Data/DevHive.Data/Interfaces/IUserRepository.cs | |
| parent | a2ca63701b71eed2ffa3fff6de16b9babe8bba08 (diff) | |
| download | DevHive-72502154725594cf31878aa944f4bc9d9f3521a3.tar DevHive-72502154725594cf31878aa944f4bc9d9f3521a3.tar.gz DevHive-72502154725594cf31878aa944f4bc9d9f3521a3.zip | |
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
Diffstat (limited to 'src/Data/DevHive.Data/Interfaces/IUserRepository.cs')
| -rw-r--r-- | src/Data/DevHive.Data/Interfaces/IUserRepository.cs | 8 |
1 files changed, 5 insertions, 3 deletions
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<User> { - //Read + Task<bool> AddRoleToUser(User user, string roleName); + Task<User> GetByUsernameAsync(string username); Task<bool> UpdateProfilePicture(Guid userId, string pictureUrl); - //Validations + Task<bool> VerifyPassword(User user, string password); + Task<bool> IsInRoleAsync(User user, string roleName); Task<bool> ValidateFriendsCollectionAsync(List<string> usernames); Task<bool> DoesEmailExistAsync(string email); Task<bool> DoesUserExistAsync(Guid id); Task<bool> DoesUsernameExistAsync(string username); - bool DoesUserHaveThisUsername(Guid id, string username); + Task<bool> DoesUserHaveThisUsernameAsync(Guid id, string username); } } |
