2020-05-14 22:26:40 +01:00
|
|
|
using System;
|
2020-08-26 14:38:00 +01:00
|
|
|
|
2020-05-13 22:49:54 +01:00
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
{
|
2022-11-27 12:29:35 +00:00
|
|
|
public class ClientCredentialsTokenResponse : IToken
|
2020-05-13 22:49:54 +01:00
|
|
|
{
|
2020-05-25 17:00:38 +01:00
|
|
|
public string AccessToken { get; set; } = default!;
|
|
|
|
public string TokenType { get; set; } = default!;
|
2020-05-13 22:49:54 +01:00
|
|
|
public int ExpiresIn { get; set; }
|
2020-05-14 22:26:40 +01:00
|
|
|
|
|
|
|
/// <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; }
|
2020-05-13 22:49:54 +01:00
|
|
|
}
|
|
|
|
}
|
2020-05-25 17:00:38 +01:00
|
|
|
|