AchiesUtilities.Web updated to 1.0.11. This version contains proxy credentials fix (407 error)

This commit is contained in:
Давид Чернопятов
2024-05-13 18:05:57 +03:00
parent fcd4056619
commit 9a277d07db
7 changed files with 92 additions and 14 deletions
+1
View File
@@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "changelog", "changelog", "{
changelog\1.4.7.html = changelog\1.4.7.html
changelog\1.4.8.html = changelog\1.4.8.html
changelog\1.4.9.html = changelog\1.4.9.html
changelog\1.5.0.html = changelog\1.5.0.html
EndProjectSection
EndProject
Global
+5 -7
View File
@@ -95,6 +95,7 @@ public static class MaClient
Storage.UpdateMafile(mafile);
}
public static async Task RefreshSession(Mafile mafile)
{
ValidateMafile(mafile, true);
@@ -107,6 +108,7 @@ public static class MaClient
mafile.SessionData.SetMobileToken(newToken);
}
//RETHINK: Do we need this? Mobile token is enough
var communityToken = mafile.SessionData!.GetToken(SteamDomain.Community);
if (communityToken == null || communityToken.Value.IsExpired)
{
@@ -114,7 +116,7 @@ public static class MaClient
var newToken = SteamTokenHelper.Parse(communityTokenString);
mafile.SessionData.SetToken(SteamDomain.Community, newToken);
}
Storage.UpdateMafile(mafile);
ClientHandler.CookieContainer.SetSteamMobileCookiesWithMobileToken(mafile.SessionData);
}
@@ -173,14 +175,10 @@ public static class MaClient
public static async Task<LoginConfirmationResult> ConfirmLoginRequest(Mafile mafile)
{
if (mafile.SessionData == null)
{
throw new SessionExpiredException();
}
ValidateMafile(mafile);
var token = mafile.SessionData.GetMobileToken()!.Value;
SetProxy(mafile);
var token = mafile.SessionData!.GetMobileToken()!.Value;
var uri = "https://api.steampowered.com/IAuthenticationService/GetAuthSessionsForAccount/v1?access_token=" + token.Token;
GetAuthSessionsForAccount_Response getsess;
+3 -2
View File
@@ -16,7 +16,7 @@ public static class SessionHandler
string? password = null;
try
{
if (!string.IsNullOrWhiteSpace(mafile.Password))
if (PHandler.IsPasswordSet && !string.IsNullOrWhiteSpace(mafile.Password))
{
password = PHandler.Decrypt(mafile.Password);
}
@@ -31,8 +31,9 @@ public static class SessionHandler
{
return await func();
}
catch (SessionExpiredException) when (mafile.SessionData is not { RefreshToken.IsExpired: true})
catch (SessionInvalidException) when (mafile.SessionData is { RefreshToken.IsExpired: false})
{
Shell.Logger.Debug("Token on mafile {name} {steamid} expired. Trying to refresh", mafile.AccountName, mafile.SessionData?.SteamId);
refreshed = await TryRefresh(mafile);
}
catch (SessionInvalidException)
+1 -1
View File
@@ -10,7 +10,7 @@
<SatelliteResourceLanguages>en;ru;ua</SatelliteResourceLanguages>
<ApplicationIcon>Theme\lock.ico</ApplicationIcon>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
<AssemblyVersion>1.4.9</AssemblyVersion>
<AssemblyVersion>1.5.0</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
+3 -3
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.4.9.0</version>
<url>https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/releases/download/1.4.9/NebulaAuth.1.4.9.zip</url>
<changelog>https://achiez.github.io/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/changelog/1.4.9.html</changelog>
<version>1.5.0.0</version>
<url>https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/releases/download/1.5.0/NebulaAuth.1.5.0.zip</url>
<changelog>https://achiez.github.io/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/changelog/1.5.0.html</changelog>
<mandatory>false</mandatory>
</item>
+1 -1
View File
@@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="AchiesUtilities.Newtonsoft.JSON" Version="1.2.1" />
<PackageReference Include="AchiesUtilities.Web" Version="1.0.10" />
<PackageReference Include="AchiesUtilities.Web" Version="1.0.11" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.58" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
+78
View File
@@ -0,0 +1,78 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Changelog</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #eeeeee;
color: #333;
line-height: 1.6;
}
.changelog-container {
background-color: #fff;
border-radius: 10px;
padding: 25px;
margin: 25px auto;
max-width: 800px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.change {
margin-bottom: 20px;
padding: 0;
border-left: 4px solid #a50ec7;
background-color: #f9f9f9;
}
.version {
font-weight: 600;
font-size: 1.5em;
color: #a50ec7;
margin-left: 10px;
}
.date {
font-style: italic;
color: #888;
margin-bottom: 10px;
margin-left: 15px;
}
.description {
font-size: 1em;
padding: 0 15px;
}
.description ul {
list-style: inside square;
padding: 0;
}
@media only screen and (max-width: 600px) {
.changelog-container {
width: 90%;
margin: 25px auto;
padding: 25px;
}
}
</style>
</head>
<body>
<div class="changelog-container">
<!-- Changelog entry -->
<div class="change">
<div class="version">Version 1.5.0</div>
<div class="date">13.05.2024</div>
<div class="description">
- FIX: Fixed proxy 407 error when using proxy with different credentials
</div>
</div>
</div>
</body>
</html>