namespace Jiaowu.Api.Infrastructure.Auth;

public sealed class SsoOptions
{
    public const string SectionName = "Sso";

    public bool Enabled { get; set; }
    public string DisplayName { get; set; } = "学校统一身份认证";
    public string Authority { get; set; } = string.Empty;
    public string ClientId { get; set; } = string.Empty;
    public string ClientSecret { get; set; } = string.Empty;
    public string UserNameClaim { get; set; } = "preferred_username";
    public bool RequireHttpsMetadata { get; set; } = true;
    public bool LinkExistingUsersByUserName { get; set; } = true;
    public string FrontendBaseUrl { get; set; } = string.Empty;
    public string CallbackUrl { get; set; } = string.Empty;
}

public static class SsoAuthSchemes
{
    public const string Keycloak = "Keycloak";
    public const string ExternalCookie = "KeycloakExternal";
    public const string LoginProvider = "Keycloak";
}
