Files
winui3-learning/winui-learning/winui-learning-2/Models/LoginResponse.cs
T

28 lines
678 B
C#

using System.Text.Json.Serialization;
namespace winui_learning_2.Models;
public class LoginResponse
{
[JsonPropertyName("token")]
public string? Token { get; set; }
[JsonPropertyName("accessToken")]
public string? AccessToken { get; set; }
[JsonPropertyName("access_token")]
public string? AccessTokenSnake { get; set; }
[JsonPropertyName("jwtToken")]
public string? JwtToken { get; set; }
[JsonPropertyName("jwt")]
public string? Jwt { get; set; }
[JsonPropertyName("username")]
public string? Username { get; set; }
public string? GetToken() =>
Token ?? AccessToken ?? AccessTokenSnake ?? JwtToken ?? Jwt;
}