2016-03-02 17:11:15 -07:00
|
|
|
|
using System;
|
2018-05-03 23:51:56 +02:00
|
|
|
|
using System.IO;
|
2022-12-20 22:41:14 +08:00
|
|
|
|
using System.Net.Http;
|
|
|
|
|
|
using System.Text.Json.Serialization;
|
2022-10-02 18:31:08 +08:00
|
|
|
|
using System.Text.RegularExpressions;
|
2022-08-27 23:01:28 +08:00
|
|
|
|
using System.Threading.Tasks;
|
2022-12-06 15:50:17 +08:00
|
|
|
|
using MinecraftClient.Scripting;
|
2016-03-02 17:11:15 -07:00
|
|
|
|
|
2018-05-25 20:27:31 +02:00
|
|
|
|
namespace MinecraftClient.Protocol.Session
|
2016-03-02 17:11:15 -07:00
|
|
|
|
{
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
|
public class SessionToken
|
|
|
|
|
|
{
|
2022-12-20 22:41:14 +08:00
|
|
|
|
[JsonInclude]
|
|
|
|
|
|
[JsonPropertyName("SessionID")]
|
2016-03-05 19:10:13 +01:00
|
|
|
|
public string ID { get; set; }
|
2022-12-20 22:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
[JsonInclude]
|
|
|
|
|
|
[JsonPropertyName("PlayerName")]
|
2016-03-05 19:10:13 +01:00
|
|
|
|
public string PlayerName { get; set; }
|
2022-12-20 22:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
[JsonInclude]
|
|
|
|
|
|
[JsonPropertyName("PlayerID")]
|
2016-03-05 19:10:13 +01:00
|
|
|
|
public string PlayerID { get; set; }
|
2022-12-20 22:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
[JsonInclude]
|
|
|
|
|
|
[JsonPropertyName("ClientID")]
|
2016-03-05 19:10:13 +01:00
|
|
|
|
public string ClientID { get; set; }
|
2022-12-20 22:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
[JsonInclude]
|
|
|
|
|
|
[JsonPropertyName("RefreshToken")]
|
2021-12-16 15:53:31 +08:00
|
|
|
|
public string RefreshToken { get; set; }
|
2022-08-27 23:01:28 +08:00
|
|
|
|
|
2022-12-20 22:41:14 +08:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
public string? ServerInfoHash = null;
|
|
|
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
2022-12-21 14:01:05 +08:00
|
|
|
|
public Task<Tuple<bool, string?>>? SessionPreCheckTask = null;
|
2016-03-05 19:10:13 +01:00
|
|
|
|
|
|
|
|
|
|
public SessionToken()
|
|
|
|
|
|
{
|
2022-12-20 22:41:14 +08:00
|
|
|
|
ID = string.Empty;
|
|
|
|
|
|
PlayerName = string.Empty;
|
|
|
|
|
|
PlayerID = string.Empty;
|
|
|
|
|
|
ClientID = string.Empty;
|
|
|
|
|
|
RefreshToken = string.Empty;
|
2018-05-03 23:51:56 +02:00
|
|
|
|
}
|
2016-03-02 17:11:15 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|