using System.ComponentModel.DataAnnotations; namespace StellaOps.Authority.Bootstrap; internal sealed record BootstrapUserRequest { public string? Provider { get; init; } public string? InviteToken { get; init; } [Required] public string Username { get; init; } = string.Empty; [Required] public string Password { get; init; } = string.Empty; public string? DisplayName { get; init; } public string? Email { get; init; } public bool RequirePasswordReset { get; init; } public IReadOnlyCollection? Roles { get; init; } public IReadOnlyDictionary? Attributes { get; init; } } internal sealed record BootstrapClientRequest { public string? Provider { get; init; } public string? InviteToken { get; init; } [Required] public string ClientId { get; init; } = string.Empty; public bool Confidential { get; init; } = true; public string? DisplayName { get; init; } public string? ClientSecret { get; init; } public IReadOnlyCollection? AllowedGrantTypes { get; init; } public IReadOnlyCollection? AllowedScopes { get; init; } public IReadOnlyCollection? AllowedAudiences { get; init; } public IReadOnlyCollection? RedirectUris { get; init; } public IReadOnlyCollection? PostLogoutRedirectUris { get; init; } public IReadOnlyDictionary? Properties { get; init; } public IReadOnlyCollection? CertificateBindings { get; init; } } internal sealed record BootstrapInviteRequest { public string Type { get; init; } = BootstrapInviteTypes.User; public string? Token { get; init; } public string? Provider { get; init; } public string? Target { get; init; } public DateTimeOffset? ExpiresAt { get; init; } public string? IssuedBy { get; init; } public IReadOnlyDictionary? Metadata { get; init; } } internal sealed record BootstrapClientCertificateBinding { public string Thumbprint { get; init; } = string.Empty; public string? SerialNumber { get; init; } public string? Subject { get; init; } public string? Issuer { get; init; } public IReadOnlyCollection? SubjectAlternativeNames { get; init; } public DateTimeOffset? NotBefore { get; init; } public DateTimeOffset? NotAfter { get; init; } public string? Label { get; init; } } internal static class BootstrapInviteTypes { public const string User = "user"; public const string Client = "client"; }