chore: init commit from GitHub
Some checks are pending
Deploy / update (push) Waiting to run
Build Project .NET / build (push) Waiting to run

This commit is contained in:
Lisoveliy
2025-05-12 19:44:33 +03:00
parent 11a3f40596
commit aebe654c38
107 changed files with 18953 additions and 403 deletions

View File

@@ -0,0 +1,28 @@
using System.Text.Json.Serialization;
using SWAD.API.Services.MusicAPI.Auth;
namespace SWAD.API.Models.JsonStructures.MusicAPI;
public abstract class DefaultAuthResponse : IAuthResponse
{
private int? _expire;
private DateTime? _revokedAt;
[JsonPropertyName("access_token")]
// ReSharper disable once NullableWarningSuppressionIsUsed
public string Token { get; set; } = null!;
[JsonPropertyName("expires_in")]
public int? ExpireTime
{
get => _expire;
set
{
_expire = value;
_revokedAt = DateTime.UtcNow;
}
}
public DateTime? ExpireAt => _revokedAt?.AddSeconds(ExpireTime ?? 0);
}