28 lines
1.2 KiB
C#
28 lines
1.2 KiB
C#
using Google.Apis.Oauth2.v2.Data;
|
|
using Hutopy.Application.Common.Models;
|
|
using Hutopy.Application.Users.Models;
|
|
|
|
namespace Hutopy.Application.Common.Interfaces;
|
|
|
|
public interface IIdentityService
|
|
{
|
|
Task<Result<string>> CreateUserAsync(Userinfo userInfo);
|
|
Task<Result<string>> CreateUserAsync(string email, string userName, string firstName, string lastName, string password);
|
|
Task<UserModel?> GetCurrentUserAsync();
|
|
Task<Result> UpdateCurrentUserBannerPictureUrlAsync(string url);
|
|
Task<Result> UpdateCurrentUserProfilePictureUrlAsync(string url);
|
|
Task<Result> UpdateCurrentUserWebsiteIconUrlAsync(string url);
|
|
Task<Result<string>> UpdateCurrentUserAsync(UserModel userModel);
|
|
Task<IList<string>> GetCurrentUserRolesAsync();
|
|
Task<UserModel?> FindUserByIdAsync(string id);
|
|
Task<UserModel?> FindUserByEmailAsync(string email);
|
|
Task<UserModel?> GetUserByUserNameAsync(string userName);
|
|
Task<string?> LoginAsync(string email, string password);
|
|
Task<bool> IsInRoleAsync(string userId, string role);
|
|
Task<bool> AuthorizeAsync(string userId, string policyName);
|
|
Task<string?> GetUserNameAsync(string userId);
|
|
|
|
Task<Result> AddRoleAsync(string userId, string role);
|
|
Task<Result> DeleteUserAsync(string userId);
|
|
}
|