.NET 10 solution for Ping, a Discord style chat app: Domain, Application and Infrastructure projects plus the Api host. SignalR for chat and presence, LiveKit for call tokens, EF Core on Postgres, S3 compatible storage for attachments, and OIDC auth shared with the Musify Zitadel instance. Includes the Compose stack for local development.
40 lines
897 B
C#
40 lines
897 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Ping.Api.Authentication;
|
|
|
|
public sealed class AuthenticationConfiguration
|
|
{
|
|
public const string SectionName = "Authentication";
|
|
|
|
[Required]
|
|
[Url]
|
|
public required string MetadataAddress { get; set; }
|
|
|
|
[Required]
|
|
public required string IssuerAddress { get; set; }
|
|
|
|
[Required]
|
|
public required string AudienceAddress { get; set; }
|
|
|
|
[Required]
|
|
public required string ClientId { get; set; }
|
|
|
|
public string? ClientSecret { get; set; }
|
|
|
|
[Required]
|
|
[Url]
|
|
public required string AuthorizationEndpoint { get; set; }
|
|
|
|
[Required]
|
|
[Url]
|
|
public required string TokenEndpoint { get; set; }
|
|
|
|
[Required]
|
|
[MinLength(1)]
|
|
public required string[] Scopes { get; set; }
|
|
|
|
public string? ScalarRedirectUri { get; set; }
|
|
|
|
public bool RequireHttpsMetadata { get; set; } = true;
|
|
}
|