Abstraction of authenticators. Reworked Gmail authentication.

This commit is contained in:
Burak Kaan Köse
2024-11-20 01:45:48 +01:00
parent 8367efa174
commit 7fad15524f
44 changed files with 354 additions and 605 deletions

View File

@@ -1,30 +0,0 @@
using System;
using SQLite;
using Wino.Core.Domain.Models.Authentication;
namespace Wino.Core.Domain.Entities.Shared
{
public class TokenInformation : TokenInformationBase
{
[PrimaryKey]
public Guid Id { get; set; }
public Guid AccountId { get; set; }
/// <summary>
/// Unique object storage for authenticators if needed.
/// </summary>
public string UniqueId { get; set; }
public string Address { get; set; }
public void RefreshTokens(TokenInformationBase tokenInformationBase)
{
if (tokenInformationBase == null)
throw new ArgumentNullException(nameof(tokenInformationBase));
AccessToken = tokenInformationBase.AccessToken;
RefreshToken = tokenInformationBase.RefreshToken;
ExpiresAt = tokenInformationBase.ExpiresAt;
}
}
}