mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 02:17:20 +02:00
feat: prolong token mutation added
This commit is contained in:
1 parent
11486b7303
commit
c94a1033c7
7 files changed
+132
-15
No files matched your search
@@ -215,6 +215,23 @@ namespace WotBlitzStatisticsPro.WgApiClient
|
||||
return GetWotUri(realm, "auth/login/", null);
|
||||
}
|
||||
|
||||
public async Task<WargamingProlongInfo> ProlongAuthToken(RealmType realm, string oldToken)
|
||||
{
|
||||
// https://api.worldoftanks.ru/wot/auth/prolongate/?application_id=98805e6ac535e88491ae64d37b764370&access_token=1234566
|
||||
string prolongUri = GetWotUri(
|
||||
realm,
|
||||
"auth/prolongate/",
|
||||
new string[] { $"access_token={oldToken}" });
|
||||
var prolongResult = await CallWgApi<WotAuthProlongateResponse>(prolongUri, true);
|
||||
|
||||
return new WargamingProlongInfo
|
||||
{
|
||||
AccessToken = prolongResult!.AccessToken,
|
||||
AccountId = prolongResult.AccountId,
|
||||
ExpirationTimeStamp = prolongResult.ExpirationTimeStamp
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user