#nullable enable
using System.Collections.Generic;
using API.Entities.Enums;
namespace API.DTOs.Settings;
public record OidcConfigDto: OidcPublicConfigDto
{
///
/// If true, auto creates a new account when someone logs in via OpenID Connect
///
public bool ProvisionAccounts { get; set; }
///
/// Require emails to be verified by the OpenID Connect provider when creating accounts on login
///
public bool RequireVerifiedEmail { get; set; } = true;
///
/// Overwrite Kavita roles, libraries and age rating with OpenIDConnect provides roles on log in.
///
public bool SyncUserSettings { get; set; }
// Default values used when SyncUserSettings is false
#region Default user settings
public List DefaultRoles { get; set; } = [];
public List DefaultLibraries { get; set; } = [];
public AgeRating DefaultAgeRating { get; set; } = AgeRating.Unknown;
public bool DefaultIncludeUnknowns { get; set; } = false;
#endregion
///
/// Returns true if the has been set
///
public bool Enabled => Authority != "";
}