You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.4 KiB
61 lines
1.4 KiB
using Unity.Plastic.Newtonsoft.Json; |
|
|
|
using PlasticGui.WebApi.Responses; |
|
|
|
namespace Unity.PlasticSCM.Editor.WebApi |
|
{ |
|
/// <summary> |
|
/// Response to credentials request. |
|
/// </summary> |
|
public class CredentialsResponse |
|
{ |
|
/// <summary> |
|
/// Error caused by the request. |
|
/// </summary> |
|
[JsonProperty("error")] |
|
public ErrorResponse.ErrorFields Error { get; set; } |
|
|
|
/// <summary> |
|
/// Type of the token. |
|
/// </summary> |
|
public enum TokenType : int |
|
{ |
|
/// <summary> |
|
/// Password token. |
|
/// </summary> |
|
Password = 0, |
|
|
|
/// <summary> |
|
/// Bearer token. |
|
/// </summary> |
|
Bearer = 1, |
|
} |
|
|
|
/// <summary> |
|
/// Get the type of the token. |
|
/// </summary> |
|
[JsonIgnore] |
|
public TokenType Type |
|
{ |
|
get { return (TokenType)TokenTypeValue; } |
|
} |
|
|
|
/// <summary> |
|
/// The user's email. |
|
/// </summary> |
|
[JsonProperty("email")] |
|
public string Email; |
|
|
|
/// <summary> |
|
/// The credential's token. |
|
/// </summary> |
|
[JsonProperty("token")] |
|
public string Token; |
|
|
|
/// <summary> |
|
/// The token type represented as an integer. |
|
/// </summary> |
|
[JsonProperty("tokenTypeValue")] |
|
public int TokenTypeValue; |
|
} |
|
}
|
|
|