50f5307aac
PR Checks / test-and-build (pull_request) Successful in 5m47s
- Bump version to 2.8.0 across all versioned files - Fix AuthorizedSessionServiceTests for platform-agnostic identity - Update Razor Pages to use *ForCurrentUserAsync APIs - Add backward-compatible constructors to WebGameGroup/WebGroupManager - Make DiscordOAuthOptions properties non-required for config binding Bump version → 2.8.0 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
20 lines
760 B
C#
20 lines
760 B
C#
namespace GmRelay.Web;
|
|
|
|
public sealed class DiscordOAuthOptions
|
|
{
|
|
public string ClientId { get; set; } = string.Empty;
|
|
public string ClientSecret { get; set; } = string.Empty;
|
|
public string RedirectUri { get; set; } = string.Empty;
|
|
public string[] Scopes { get; set; } = ["identify", "guilds"];
|
|
|
|
public void Validate()
|
|
{
|
|
if (string.IsNullOrWhiteSpace(ClientId))
|
|
throw new InvalidOperationException("Discord:ClientId is required.");
|
|
if (string.IsNullOrWhiteSpace(ClientSecret))
|
|
throw new InvalidOperationException("Discord:ClientSecret is required.");
|
|
if (string.IsNullOrWhiteSpace(RedirectUri))
|
|
throw new InvalidOperationException("Discord:RedirectUri is required.");
|
|
}
|
|
}
|