From 26b18fe3727507d1b47ffb53ed773f133122eee8 Mon Sep 17 00:00:00 2001 From: transtrike Date: Sun, 28 Feb 2021 13:00:16 +0200 Subject: Integrated new JWT validation where needed --- .../DevHive.Services/Interfaces/IUserService.cs | 49 +++++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) (limited to 'src/Services/DevHive.Services/Interfaces') diff --git a/src/Services/DevHive.Services/Interfaces/IUserService.cs b/src/Services/DevHive.Services/Interfaces/IUserService.cs index 4a9ffc8..a55f9dd 100644 --- a/src/Services/DevHive.Services/Interfaces/IUserService.cs +++ b/src/Services/DevHive.Services/Interfaces/IUserService.cs @@ -7,19 +7,64 @@ namespace DevHive.Services.Interfaces { public interface IUserService { + /// + /// Log ins an existing user and gives him/her a JWT Token for further authorization + /// + /// Login service model, conaining user's username and password + /// A JWT Token for authorization Task LoginUser(LoginServiceModel loginModel); + + /// + /// Registers a new user and gives him/her a JWT Token for further authorization + /// + /// Register service model, containing the new user's data + /// A JWT Token for authorization Task RegisterUser(RegisterServiceModel registerModel); + /// + /// Get a user by his username. Used for querying profiles without provided authentication + /// + /// User's username, who's to be queried + /// The queried user or null, if non existant Task GetUserByUsername(string username); + + /// + /// Get a user by his Guid. Used for querying full user's profile + /// Requires authenticated user + /// + /// User's username, who's to be queried + /// The queried user or null, if non existant Task GetUserById(Guid id); + /// + /// Updates a user's data, provided a full model with new details + /// Requires authenticated user + /// + /// Full update user model for updating + /// Read model of the new user Task UpdateUser(UpdateUserServiceModel updateUserServiceModel); + + /// + /// Uploads the given picture and assigns it's link to the user in the database + /// Requires authenticated user + /// + /// Contains User's Guid and the new picture to be updated + /// The new picture's URL Task UpdateProfilePicture(UpdateProfilePictureServiceModel updateProfilePictureServiceModel); + /// + /// Deletes a user from the database and removes his data entirely + /// Requires authenticated user + /// + /// The user's Guid, who's to be deleted + /// True if successfull, false otherwise Task DeleteUser(Guid id); - Task ValidJWT(Guid id, string rawTokenData); - + /// + /// We don't talk about that! + /// + /// + /// Task SuperSecretPromotionToAdmin(Guid userId); } } -- cgit v1.2.3