diff --git a/src/API/Controllers/Neutrino/NeutrinoController.cs b/src/API/Controllers/Neutrino/NeutrinoController.cs index 8f91bac..c25f781 100644 --- a/src/API/Controllers/Neutrino/NeutrinoController.cs +++ b/src/API/Controllers/Neutrino/NeutrinoController.cs @@ -18,7 +18,7 @@ public class NeutrinoController( private readonly NeutrinoOptions _options = options.Value; // Photon sends the request with Content-Type: text/plain instead of application/json. - [Route("authorize")] + [HttpPost("authorize")] public async Task> AuthorizeNeutrinoAsync( [FromQuery(Name = "secret")] string? secret = null, CancellationToken ct = default) diff --git a/src/RecNet.Application/Common/Interfaces/ISteamAuthService.cs b/src/RecNet.Application/Common/Interfaces/ISteamAuthService.cs index 55ffc0b..f85efe8 100644 --- a/src/RecNet.Application/Common/Interfaces/ISteamAuthService.cs +++ b/src/RecNet.Application/Common/Interfaces/ISteamAuthService.cs @@ -6,6 +6,6 @@ public interface ISteamAuthService { Task AuthorizeAsync( string ticket, - uint appId, + string appId, CancellationToken ct = default); } \ No newline at end of file diff --git a/src/RecNet.Infrastructure/Services/Steam/SteamAuthService.cs b/src/RecNet.Infrastructure/Services/Steam/SteamAuthService.cs index efcea91..1de2d1f 100644 --- a/src/RecNet.Infrastructure/Services/Steam/SteamAuthService.cs +++ b/src/RecNet.Infrastructure/Services/Steam/SteamAuthService.cs @@ -16,7 +16,7 @@ public class SteamAuthService( public async Task AuthorizeAsync( string ticket, - uint appId, + string appId, CancellationToken ct = default) { if (string.IsNullOrWhiteSpace(ticket)) diff --git a/src/RecNet.Infrastructure/Services/Steam/SteamAuthValidator.cs b/src/RecNet.Infrastructure/Services/Steam/SteamAuthValidator.cs index 72964d8..e877ef9 100644 --- a/src/RecNet.Infrastructure/Services/Steam/SteamAuthValidator.cs +++ b/src/RecNet.Infrastructure/Services/Steam/SteamAuthValidator.cs @@ -30,7 +30,7 @@ public class SteamAuthValidator(ISteamAuthService steamAuthService) : IPlatformA if (steamParams?.AppId is null || string.IsNullOrWhiteSpace(steamParams.Ticket)) return PlatformAuthResult.Failure("Invalid authentication"); - var result = await steamAuthService.AuthorizeAsync(steamParams.Ticket, steamParams.AppId.AppId, ct); + var result = await steamAuthService.AuthorizeAsync(steamParams.Ticket, steamParams.AppId, ct); if (!result.Succeeded || result.SteamId is null) return PlatformAuthResult.Failure("Invalid authentication"); @@ -46,13 +46,6 @@ public class SteamAuthValidator(ISteamAuthService steamAuthService) : IPlatformA { public required string Ticket { get; set; } - public required SteamAppIdAuth AppId { get; set; } - } - - // Splooty, why did you set it up like this ;-; - private sealed class SteamAppIdAuth - { - [JsonPropertyName("m_AppId")] - public required uint AppId { get; set; } + public required string AppId { get; set; } } } \ No newline at end of file diff --git a/src/RecNet.Infrastructure/Services/Steam/SteamOptions.cs b/src/RecNet.Infrastructure/Services/Steam/SteamOptions.cs index afd46f6..12e1af2 100644 --- a/src/RecNet.Infrastructure/Services/Steam/SteamOptions.cs +++ b/src/RecNet.Infrastructure/Services/Steam/SteamOptions.cs @@ -3,5 +3,5 @@ public class SteamOptions { public string ApiKey { get; set; } = string.Empty; - public uint AppId { get; set; } = 480; // Spacewar + public string AppId { get; set; } = "480"; // Spacewar }