// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see .
using System.Collections.Generic;
namespace Kyoo.Authentication.Models;
public class ServerInfo
{
///
/// The list of oidc providers configured for this instance of kyoo.
///
public Dictionary Oidc { get; set; }
///
/// The url to reach the homepage of kyoo (add /api for the api).
///
public string PublicUrl { get; set; }
///
/// True if guest accounts are allowed on this instance.
///
public bool AllowGuests { get; set; }
///
/// True if new users needs to be verifed.
///
public bool RequireVerification { get; set; }
///
/// The list of permissions available for the guest account.
///
public List GuestPermissions { get; set; }
///
/// Check if kyoo's setup is finished.
///
public SetupStep SetupStatus { get; set; }
///
/// True if password login is enabled on this instance.
///
public bool PasswordLoginEnabled { get; set; }
///
/// True if registration is enabled on this instance.
///
public bool RegistrationEnabled { get; set; }
}
public class OidcInfo
{
///
/// The name of this oidc service. Human readable.
///
public string DisplayName { get; set; }
///
/// A url returing a square logo for this provider.
///
public string? LogoUrl { get; set; }
}
///
/// Check if kyoo's setup is finished.
///
public enum SetupStep
{
///
/// No admin account exists, create an account before exposing kyoo to the internet!
///
MissingAdminAccount,
///
/// No video was registered on kyoo, have you configured the rigth library path?
///
NoVideoFound,
///
/// Setup finished!
///
Done,
}