Spotify.NET/SpotifyAPI.Web/Models/Request/AuthorizationCodeRefreshRequest.cs

45 lines
1.5 KiB
C#
Raw Normal View History

2020-05-15 19:06:24 +01:00
namespace SpotifyAPI.Web
{
/// <summary>
/// Used when requesting a refreshed token from spotify oauth services (Authorization Code Auth)
/// </summary>
public class AuthorizationCodeRefreshRequest
{
/// <summary>
///
/// </summary>
/// <param name="clientId">The Client ID of your Spotify Application (See Spotify Dev Dashboard)</param>
/// <param name="clientSecret">The Client Secret of your Spotify Application (See Spotify Dev Dashboard)</param>
/// <param name="refreshToken">The refresh token received from an earlier authorization code grant</param>
2020-05-15 19:06:24 +01:00
public AuthorizationCodeRefreshRequest(string clientId, string clientSecret, string refreshToken)
{
Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId));
Ensure.ArgumentNotNullOrEmptyString(clientSecret, nameof(clientSecret));
Ensure.ArgumentNotNullOrEmptyString(refreshToken, nameof(refreshToken));
ClientId = clientId;
ClientSecret = clientSecret;
RefreshToken = refreshToken;
}
/// <summary>
/// The refresh token received from an earlier authorization code grant
/// </summary>
/// <value></value>
2020-05-15 19:06:24 +01:00
public string RefreshToken { get; }
/// <summary>
/// The Client ID of your Spotify Application (See Spotify Dev Dashboard)
/// </summary>
/// <value></value>
2020-05-15 19:06:24 +01:00
public string ClientId { get; }
/// <summary>
/// The Client Secret of your Spotify Application (See Spotify Dev Dashboard)
/// </summary>
/// <value></value>
2020-05-15 19:06:24 +01:00
public string ClientSecret { get; }
}
}
2020-05-25 17:00:38 +01:00