mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-26 16:06:27 +00:00
a9c4aba7fa
* Add interfaces for tokens * Delete UpgradeLog.htm * Changed Namespace Co-authored-by: Jonas Dellinger <jonas@dellinger.dev>
21 lines
508 B
C#
21 lines
508 B
C#
using System;
|
|
|
|
namespace SpotifyAPI.Web
|
|
{
|
|
public class ClientCredentialsTokenResponse: IToken
|
|
{
|
|
public string AccessToken { get; set; } = default!;
|
|
public string TokenType { get; set; } = default!;
|
|
public int ExpiresIn { get; set; }
|
|
|
|
/// <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; }
|
|
}
|
|
}
|
|
|