2024-04-18 01:44:37 +02:00
|
|
|
|
using System.Threading.Tasks;
|
2024-07-21 05:45:02 +02:00
|
|
|
|
using Wino.Domain.Entities;
|
|
|
|
|
|
using Wino.Domain.Enums;
|
|
|
|
|
|
using Wino.Domain.Interfaces;
|
2024-04-18 01:44:37 +02:00
|
|
|
|
|
2024-07-21 05:45:02 +02:00
|
|
|
|
namespace Wino.Services.Authenticators
|
2024-04-18 01:44:37 +02:00
|
|
|
|
{
|
|
|
|
|
|
public abstract class BaseAuthenticator
|
|
|
|
|
|
{
|
|
|
|
|
|
public abstract MailProviderType ProviderType { get; }
|
|
|
|
|
|
|
|
|
|
|
|
protected ITokenService TokenService { get; }
|
|
|
|
|
|
|
|
|
|
|
|
protected BaseAuthenticator(ITokenService tokenService)
|
|
|
|
|
|
{
|
|
|
|
|
|
TokenService = tokenService;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
internal Task SaveTokenInternalAsync(MailAccount account, TokenInformation tokenInformation)
|
|
|
|
|
|
=> TokenService.SaveTokenInformationAsync(account.Id, tokenInformation);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|