Implement refresh autodiscover (#1091)
Some checks failed
Qodana / qodana (push) Has been cancelled
Continuous Integration / Build & Test (push) Has been cancelled
Upload Translations to Crowdin / crowdin-sync (push) Has been cancelled
Build Docker Image / Build and Publish (push) Has been cancelled

* Implement refresh autodiscover

* Make record fields required

* Implement checking for the Patchwork user agent (#1090)

* Implement checking for the Patchwork user agent, move logout into standalone method

* Quick fixes (awesome name)

* 403 user at login instead of logging out at /announce

* Move configuration and revert logout changes

* Rework parsing to check against GameVersion enum and game token GameVersion

* Fix logic error

oopsie

* Fix Zaprit suggestions

* Simplify patchwork game version test

* Test patchwork user agent with regex instead

* Fix Qodana warnings

* Fix remaining Qodana warnings

* Implement refresh autodiscover

* Make record fields required

* Update ProjectLighthouse.Servers.Website/Controllers/AutoDiscoverController.cs

Co-authored-by: Josh <josh@slendy.pw>

---------

Co-authored-by: FeTetra <166051662+FeTetra@users.noreply.github.com>
Co-authored-by: Josh <josh@slendy.pw>
This commit is contained in:
Henry Asbridge 2025-06-07 15:01:29 +01:00 committed by GitHub
commit 9258469a1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 48 additions and 1 deletions

View file

@ -0,0 +1,19 @@
using Newtonsoft.Json;
namespace LBPUnion.ProjectLighthouse.Servers.Website.Types;
public record AutoDiscoverResponse
{
[JsonProperty("version")]
public required uint Version { get; set; }
[JsonProperty("serverBrand")]
public required string ServerBrand { get; set; }
[JsonProperty("serverDescription")]
public required string ServerDescription { get; set; }
[JsonProperty("url")]
public required string Url { get; set; }
[JsonProperty("bannerImageUrl")]
public string? BannerImageUrl { get; set; }
[JsonProperty("usesCustomDigestKey")]
public required bool UsesCustomDigestKey { get; set; }
}