using MediaBrowser.Model.Plugins;
namespace Jellyfin.Plugin.OidcAuth.Configuration;
///
/// Plugin configuration for OIDC authentication.
///
public class PluginConfiguration : BasePluginConfiguration
{
///
/// Gets or sets the OIDC issuer URL (authority). Discovery document is fetched from
/// {issuer}/.well-known/openid-configuration.
///
public string OidIssuer { get; set; } = string.Empty;
///
/// Gets or sets the OIDC client id.
///
public string OidClientId { get; set; } = string.Empty;
///
/// Gets or sets the OIDC client secret.
///
public string OidClientSecret { get; set; } = string.Empty;
///
/// Gets or sets the requested scopes, space separated.
///
public string OidScopes { get; set; } = "openid profile email";
///
/// Gets or sets the claim used as the Jellyfin username.
///
public string UsernameClaim { get; set; } = "preferred_username";
///
/// Gets or sets the claim containing the user's roles/groups.
///
public string RoleClaim { get; set; } = "groups";
///
/// Gets or sets a comma separated list of role/group values that grant Jellyfin
/// administrator rights. When empty, admin status is never modified by the plugin.
///
public string AdminRoles { get; set; } = string.Empty;
///
/// Gets or sets a comma separated list of role/group values required to log in.
/// When empty, every authenticated user may log in.
///
public string AllowedRoles { get; set; } = string.Empty;
///
/// Gets or sets a value indicating whether unknown users are created on first login.
///
public bool CreateUsersIfMissing { get; set; } = true;
///
/// Gets or sets a value indicating whether auto-created users get a random password.
/// Without one, Jellyfin accepts a blank password for them from any client.
/// Users can still set their own password in the web profile for TV/native logins,
/// or use Quick Connect.
///
public bool SetRandomPasswordOnCreate { get; set; } = true;
///
/// Gets or sets a value indicating whether strict discovery endpoint validation is disabled.
/// Required for providers whose endpoints live on a different host than the issuer (e.g. Google).
///
public bool DisableEndpointValidation { get; set; }
}