mirror of
https://github.com/9p4/jellyfin-plugin-sso.git
synced 2026-09-19 13:12:19 +00:00
* Add UI Page for Configuration For now, this only implements OID configuration. Add configuration More frontend additions implement more frontend for save / load config Fully implement save + load implement delete provider * Cleanup UI page markup, spelling, help text, add more useful titles * Tidy up help strings https://github.com/9p4/jellyfin-plugin-sso/pull/18#discussion_r857147540 https://github.com/9p4/jellyfin-plugin-sso/pull/18#discussion_r857147695 https://github.com/9p4/jellyfin-plugin-sso/pull/18#discussion_r857147715 https://github.com/9p4/jellyfin-plugin-sso/pull/18#discussion_r857147806 https://github.com/9p4/jellyfin-plugin-sso/pull/18#discussion_r857147832
63 lines
1.9 KiB
C#
63 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Jellyfin.Plugin.SSO_Auth.Config;
|
|
using MediaBrowser.Common.Configuration;
|
|
using MediaBrowser.Common.Plugins;
|
|
using MediaBrowser.Model.Plugins;
|
|
using MediaBrowser.Model.Serialization;
|
|
|
|
namespace Jellyfin.Plugin.SSO_Auth;
|
|
|
|
/// <summary>
|
|
/// The SSO plugin class.
|
|
/// </summary>
|
|
public class SSOPlugin : BasePlugin<PluginConfiguration>, IHasWebPages
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="SSOPlugin"/> class.
|
|
/// </summary>
|
|
/// <param name="applicationPaths">Internal Jellyfin interface for the ApplicationPath.</param>
|
|
/// <param name="xmlSerializer">Internal Jellyfin interface for the XML information.</param>
|
|
public SSOPlugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
|
|
: base(applicationPaths, xmlSerializer)
|
|
{
|
|
Instance = this;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the instance of the SSO plugin.
|
|
/// </summary>
|
|
public static SSOPlugin Instance { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Gets the name of the SSO plugin.
|
|
/// </summary>
|
|
public override string Name => "SSO-Auth";
|
|
|
|
/// <summary>
|
|
/// Gets the GUID of the SSO plugin.
|
|
/// </summary>
|
|
public override Guid Id => Guid.Parse("505ce9d1-d916-42fa-86ca-673ef241d7df");
|
|
|
|
/// <summary>
|
|
/// Returns the available internal web pages of this plugin.
|
|
/// </summary>
|
|
/// <returns>A list of internal webpages in this application.</returns>
|
|
public IEnumerable<PluginPageInfo> GetPages()
|
|
{
|
|
return new[]
|
|
{
|
|
new PluginPageInfo
|
|
{
|
|
Name = Name,
|
|
EmbeddedResourcePath = $"{GetType().Namespace}.Config.configPage.html"
|
|
},
|
|
new PluginPageInfo
|
|
{
|
|
Name = Name + ".js",
|
|
EmbeddedResourcePath = $"{GetType().Namespace}.Config.config.js"
|
|
},
|
|
};
|
|
}
|
|
}
|