Code cleanup

This commit is contained in:
Matthew Strasiotto
2022-08-14 13:13:07 +10:00
committed by Matthew Strasitoto
parent ebfcadc862
commit a7fb4d4ef0
3 changed files with 1 additions and 34 deletions
-16
View File
@@ -8,26 +8,10 @@
// These helpers were not published within a Nuget package, so it was neccessary to re-implement. // These helpers were not published within a Nuget package, so it was neccessary to re-implement.
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mime;
using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using IdentityModel.OidcClient;
using Jellyfin.Data.Entities;
using Jellyfin.Data.Enums; using Jellyfin.Data.Enums;
using Jellyfin.Plugin.SSO_Auth.Config;
using Jellyfin.Plugin.SSO_Auth.Helpers;
using MediaBrowser.Controller.Authentication;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Session;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Jellyfin.Plugin.SSO_Auth.Helpers; namespace Jellyfin.Plugin.SSO_Auth.Helpers;
+1 -1
View File
@@ -668,7 +668,7 @@ public class SSOController : ControllerBase
} }
/// <summary> /// <summary>
/// Removes a user from SSO auth and switches it back to another auth provider. Requires administrator privileges. /// Create a canonical link for a given user. Must be performed by the user being changed, or admin.
/// </summary> /// </summary>
/// <param name="mode">The mode of the function; SAML or OID.</param> /// <param name="mode">The mode of the function; SAML or OID.</param>
/// <param name="provider">The name of the provider to link to a jellyfin account.</param> /// <param name="provider">The name of the provider to link to a jellyfin account.</param>
-17
View File
@@ -1,30 +1,14 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.Mime;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using IdentityModel.OidcClient;
using Jellyfin.Data.Entities;
using Jellyfin.Data.Enums;
using Jellyfin.Plugin.SSO_Auth;
using Jellyfin.Plugin.SSO_Auth.Config;
using Jellyfin.Plugin.SSO_Auth.Helpers;
using MediaBrowser.Controller.Authentication;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Session; using MediaBrowser.Controller.Session;
using MediaBrowser.Model; using MediaBrowser.Model;
using MediaBrowser.Model.Plugins; using MediaBrowser.Model.Plugins;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Jellyfin.Plugin.SSO_Auth.Views; namespace Jellyfin.Plugin.SSO_Auth.Views;
@@ -94,7 +78,6 @@ public class SSOViewsController : ControllerBase
/// </summary> /// </summary>
/// <param name="viewName">The name of the view / asset to fetch.</param> /// <param name="viewName">The name of the view / asset to fetch.</param>
/// <returns>The html view with the specified name.</returns> /// <returns>The html view with the specified name.</returns>
// [Authorize(Policy = "DefaultAuthorization")]
[HttpGet("{viewName}")] [HttpGet("{viewName}")]
public ActionResult GetView([FromRoute] string viewName) public ActionResult GetView([FromRoute] string viewName)
{ {