19 lines
840 B
C#
19 lines
840 B
C#
using System.Net;
|
|
using YandexMusic.API.Models.Account;
|
|
|
|
namespace YandexMusic.API.Requests.Account;
|
|
|
|
public class YGetAuthAppPasswordBuilder : YAuthRequestBuilder<YAuthBase?, string>
|
|
{
|
|
public YGetAuthAppPasswordBuilder(YandexMusicApi api) : base(api) { }
|
|
protected override string Method => WebRequestMethods.Http.Post;
|
|
protected override string PathTemplate => "registration-validations/auth/multi_step/commit_password";
|
|
protected override HttpContent? GetContent(string password)
|
|
=> new FormUrlEncodedContent(new Dictionary<string, string>
|
|
{
|
|
{ "csrf_token", Api.Storage.AuthToken.CsfrToken },
|
|
{ "track_id", Api.Storage.AuthToken.TrackId },
|
|
{ "password", password },
|
|
{ "retpath", "https://passport.yandex.ru/am/finish?status=ok&from=Login" }
|
|
});
|
|
} |