2020-08-06 19:48:49 +01:00
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
{
|
2022-11-27 12:29:35 +00:00
|
|
|
public class PKCETokenResponse : IRefreshableToken
|
2020-08-06 19:48:49 +01:00
|
|
|
{
|
|
|
|
public string AccessToken { get; set; } = default!;
|
|
|
|
public string TokenType { get; set; } = default!;
|
|
|
|
public int ExpiresIn { get; set; }
|
|
|
|
public string Scope { get; set; } = default!;
|
|
|
|
public string RefreshToken { get; set; } = default!;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Auto-Initalized to UTC Now
|
|
|
|
/// </summary>
|
|
|
|
/// <value></value>
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
|
|
|
|
public bool IsExpired { get => CreatedAt.AddSeconds(ExpiresIn) <= DateTime.UtcNow; }
|
|
|
|
}
|
|
|
|
}
|