36 lines
980 B
C#
36 lines
980 B
C#
|
using BinaryDad.Extensions;
|
|||
|
using Newtonsoft.Json;
|
|||
|
using Salesforce.NET.Converters;
|
|||
|
using System;
|
|||
|
|
|||
|
namespace Salesforce.NET
|
|||
|
{
|
|||
|
public class AuthenticationResponse : IApiResponse
|
|||
|
{
|
|||
|
[JsonProperty("access_token")]
|
|||
|
public string AccessToken { get; internal set; }
|
|||
|
|
|||
|
[JsonProperty("instance_url")]
|
|||
|
public string InstanceUrl { get; internal set; }
|
|||
|
|
|||
|
public string Id { get; internal set; }
|
|||
|
|
|||
|
[JsonProperty("token_type")]
|
|||
|
public TokenType TokenType { get; internal set; }
|
|||
|
|
|||
|
[JsonProperty("issued_at")]
|
|||
|
[JsonConverter(typeof(UnixTimestampDateConverter))]
|
|||
|
public DateTime IssuedAt { get; internal set; }
|
|||
|
|
|||
|
[JsonProperty("signature")]
|
|||
|
public string Signature { get; internal set; }
|
|||
|
|
|||
|
public string Error { get; set; }
|
|||
|
|
|||
|
[JsonProperty("error_description")]
|
|||
|
public string ErrorDescription { get; set; }
|
|||
|
|
|||
|
public bool Success => AccessToken.IsNotEmpty();
|
|||
|
}
|
|||
|
}
|