mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-27 08:26:25 +00:00
24 lines
641 B
C#
24 lines
641 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace SpotifyAPI.Web
|
|
{
|
|
public class AuthorizationCodeTokenResponse
|
|
{
|
|
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; }
|
|
}
|
|
}
|
|
|