AyCode.Core/AyCode.Interfaces/Logins/IAcLoginServiceCommon.cs

25 lines
1.3 KiB
C#

using AyCode.Interfaces.Addresses;
using AyCode.Interfaces.Profiles;
using AyCode.Interfaces.ServiceProviders;
using AyCode.Interfaces.Users;
namespace AyCode.Interfaces.Logins;
public interface IAcLoginServiceCommon<TUser, TProfile, TServiceProvider, TUserToServiceProvider, TProfileAddress> : IAcLoginServiceBase<TUser, TProfile, TServiceProvider, TUserToServiceProvider, TProfileAddress>
where TUser : class, IAcUser<TProfile, TServiceProvider, TUserToServiceProvider, TProfileAddress>
where TProfile : class, IAcProfile<TProfileAddress>
where TServiceProvider : class, IAcServiceProviderBase
where TUserToServiceProvider : class, IAcUserToServiceProviderBase
where TProfileAddress : class, IAcAddress
{
public TUser? Login(string email, string password, out string accessToken);
public Task<TUser?> LoginAsync(string email, string password);
public bool Logout();
public Task<bool> LogoutAsync();
public TUser? Registration(string email, string password, string? phoneNumber = null);
public TUser? Registration(Guid userId, string email, string password, string? phoneNumber = null);
public Task<TUser?> RegistrationAsync(string email, string password, string? phoneNumber = null);
public Task<TUser?> RegistrationAsync(Guid userId, string email, string password, string? phoneNumber = null);
}