This repository has been archived on 2024-03-05. You can view files and clone it, but cannot push or open issues or pull requests.
Salesforce.NET/AuthenticationResponse.cs
2021-04-20 18:10:07 -04:00

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();
}
}