Skip to content

Commit

Permalink
Updates for 10.9 (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
crobibero authored May 11, 2024
1 parent d6844b3 commit 00ccc30
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
3 changes: 2 additions & 1 deletion LDAP-Auth/Api/LdapController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Text.RegularExpressions;
using Jellyfin.Plugin.LDAP_Auth.Api.Models;
using MediaBrowser.Common;
using MediaBrowser.Common.Api;
using MediaBrowser.Controller.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
Expand All @@ -17,7 +18,7 @@ namespace Jellyfin.Plugin.LDAP_Auth.Api
/// The LDAP api controller.
/// </summary>
[ApiController]
[Authorize(Policy = "RequiresElevation")]
[Authorize(Policy = Policies.RequiresElevation)]
[Route("[controller]")]
[Produces(MediaTypeNames.Application.Json)]
public class LdapController : ControllerBase
Expand Down
2 changes: 1 addition & 1 deletion LDAP-Auth/LDAP-Auth.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Jellyfin.Plugin.LDAP_Auth</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
19 changes: 19 additions & 0 deletions LDAP-Auth/ServiceRegistrator.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using MediaBrowser.Controller;
using MediaBrowser.Controller.Authentication;
using MediaBrowser.Controller.Plugins;
using Microsoft.Extensions.DependencyInjection;

namespace Jellyfin.Plugin.LDAP_Auth;

/// <summary>
/// Register LDAP services.
/// </summary>
public class ServiceRegistrator : IPluginServiceRegistrator
{
/// <inheritdoc />
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
{
serviceCollection.AddSingleton<IAuthenticationProvider, LdapAuthenticationProviderPlugin>();
serviceCollection.AddSingleton<IPasswordResetProvider, LdapAuthenticationProviderPlugin>();
}
}
14 changes: 2 additions & 12 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: "LDAP Authentication"
guid: "958aad66-3784-4d2a-b89a-a7b6fab6e25c"
imageUrl: "https://repo.jellyfin.org/releases/plugin/images/jellyfin-plugin-ldapauth.png"
version: 18
targetAbi: "10.8.13.0"
framework: "net6.0"
targetAbi: "10.9.0.0"
framework: "net8.0"
owner: "jellyfin"
overview: "Authenticate users against an LDAP database"
description: |
Expand All @@ -15,13 +15,3 @@ artifacts:
- "LDAP-Auth.dll"
- "Novell.Directory.Ldap.NETStandard.dll"
changelog: |-
- Implement proper input sanitization to prevent LDAP injection attacks (#153) @tam1m
### New features and improvements ###
- Added (#147) @sdimovv
### Code or Repo Maintenance ###
- Update link to Jellyfin website (#150) @methbkts
### Documentation updates ###
- Fix "build" shields badge (#152) @Radiicall

0 comments on commit 00ccc30

Please sign in to comment.