Переделан способ авторизации по qr
All checks were successful
Release / pack-and-publish (release) Successful in 1m5s

This commit is contained in:
FrigaT
2026-04-20 14:31:47 +03:00
parent a7caf829d3
commit 0bbaac5689
15 changed files with 194 additions and 50 deletions

View File

@@ -2,4 +2,4 @@
public class YAuthEmpty
{
}
}

View File

@@ -0,0 +1,21 @@
using System.Text.Json.Serialization;
namespace YandexMusic.API.Models.Account;
public class YAuthQRSession
{
[JsonPropertyName("default_uid")]
public int DefaultUid { get; set; }
[JsonPropertyName("retpath")]
public string RetPath { get; set; }
[JsonPropertyName("track_id")]
public string TrackId { get; set; }
public string Id { get; set; }
public string State { get; set; }
public YAuthCaptcha Captcha { get; set; }
}

View File

@@ -0,0 +1,9 @@
using System.Runtime.Serialization;
namespace YandexMusic.API.Models.Account;
public enum YAuthQrState
{
[EnumMember(Value = "otp_auth_finished")]
OtpAuthFinished,
}

View File

@@ -2,19 +2,11 @@
namespace YandexMusic.API.Models.Account;
public class YAuthQRStatus : YAuthBase
public class YAuthQRStatus
{
[JsonPropertyName("default_uid")]
public int DefaultUid { get; set; }
[JsonPropertyName("state")]
public string? State { get; set; } = null;
public string RetPath { get; set; }
[JsonPropertyName("track_id")]
public string TrackId { get; set; }
public string Id { get; set; }
public string State { get; set; }
public YAuthCaptcha Captcha { get; set; }
[JsonPropertyName("trackId")]
public string TrackId { get; set; } = string.Empty;
}

View File

@@ -1,16 +1,13 @@
using System.Text.Json.Serialization;
namespace YandexMusic.API.Models.Account;
namespace YandexMusic.API.Models.Account;
public class YAuthToken
{
[JsonPropertyName("csfr_token")]
public string CsfrToken { get; set; }
[JsonPropertyName("track_id")]
public string TrackId { get; set; }
[JsonPropertyName("process_uuid")]
public string SessionTrackId { get; set; }
public string ProcessUuid { get; set; }
public Dictionary<string, string> Cookie { get; set; } = new();