// Copyright © Selmo Technology GmbH. All Rights Reserved

using Microsoft.AspNetCore.Identity;
using Novus.Shared.Types.Maybe;
using SelmoStudio.Hmi.Plugin.Model.RestApi;
using System.Security.Claims;

namespace SelmoStudio.Hmi.Server.Db.Authentication.Service
{
    public interface ISelmoAuthenticationService
    {
        Task<List<ApplicationUser>> GetAll();

        Task<bool> Exists(string username);

        Task<ApplicationUser> GetByName(string username);

        Task<Maybe<ApplicationUser>> Find(string username);

        Task<Maybe<IdentityResult>> Delete(string username);

        Task<string> Update(UpdateRequest request, HttpContext context);

        Task<string> Logout(string username, HttpContext context);

        Task<string> Register(RegisterRequest request, HttpContext context);

        Task<string> Login(LoginRequest request, HttpContext context);

        Task<IList<Claim>> GetClaims(ApplicationUser user);
    }
}