shopping-assistant-api/ShoppingAssistantApi.Application/IServices/Identity/IUsersManager.cs
2023-09-22 23:02:20 +03:00

20 lines
886 B
C#

using ShoppingAssistantApi.Application.Models.Dtos;
using ShoppingAssistantApi.Application.Models.Identity;
using ShoppingAssistantApi.Application.Models.Operations;
namespace ShoppingAssistantApi.Application.IServices.Identity;
public interface IUserManager
{
Task<TokensModel> AccessGuestAsync(AccessGuestModel guest, CancellationToken cancellationToken);
Task<TokensModel> LoginAsync(AccessUserModel login, CancellationToken cancellationToken);
Task<TokensModel> AddToRoleAsync(string roleName, string id, CancellationToken cancellationToken);
Task<TokensModel> RemoveFromRoleAsync(string roleName, string id, CancellationToken cancellationToken);
Task<UpdateUserModel> UpdateAsync(UserDto userDto, CancellationToken cancellationToken);
Task<UpdateUserModel> UpdateUserByAdminAsync(string id, UserDto userDto, CancellationToken cancellationToken);
}