fix: target Jellyfin 10.11 / net9.0

Server 10.11 moved PermissionKind to Jellyfin.Database.Implementations.Enums,
SetPermission to a Jellyfin.Data extension, and ChangePassword now takes a
user id. Plugin built against 10.10 failed to load silently.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Pascal Linxweiler
2026-07-13 13:57:25 +02:00
parent da5de2fd6a
commit fd36fb246b
6 changed files with 17 additions and 16 deletions

View File

@@ -4,7 +4,8 @@ using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using IdentityModel.OidcClient;
using Jellyfin.Data.Enums;
using Jellyfin.Data;
using Jellyfin.Database.Implementations.Enums;
using Jellyfin.Plugin.OidcAuth.Configuration;
using MediaBrowser.Controller.Authentication;
using MediaBrowser.Controller.Library;
@@ -126,7 +127,7 @@ public class OidcAuthController : ControllerBase
// Without a password Jellyfin accepts a blank password for this user
// from any client. Users can set their own later in the web profile.
await _userManager.ChangePassword(
user,
user.Id,
Convert.ToBase64String(System.Security.Cryptography.RandomNumberGenerator.GetBytes(32)))
.ConfigureAwait(false);
}

View File

@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>Jellyfin.Plugin.OidcAuth</RootNamespace>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<AssemblyVersion>1.0.1.0</AssemblyVersion>
<FileVersion>1.0.1.0</FileVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Jellyfin.Controller" Version="10.10.7" />
<PackageReference Include="Jellyfin.Controller" Version="10.11.11" />
<PackageReference Include="IdentityModel.OidcClient" Version="5.2.1" />
</ItemGroup>

View File

@@ -37,7 +37,7 @@ Copy these files from `artifacts/` into a new folder in Jellyfin's plugin direct
- `IdentityModel.OidcClient.dll`
- `IdentityModel.dll`
Requires Jellyfin 10.10.x.
Requires Jellyfin 10.11.x.
## Configure

View File

@@ -1,9 +1,9 @@
---
name: "OIDC Auth"
guid: "96badb44-9940-4ff0-befc-5f987159152c"
version: "1.0.0.0"
targetAbi: "10.10.0.0"
framework: "net8.0"
version: "1.0.1.0"
targetAbi: "10.11.0.0"
framework: "net9.0"
owner: "pascallinxweiler"
overview: "Log in to Jellyfin with an OpenID Connect provider"
description: >

View File

@@ -8,12 +8,12 @@
"category": "Authentication",
"versions": [
{
"version": "1.0.0.0",
"changelog": "Initial release.",
"targetAbi": "10.10.0.0",
"sourceUrl": "https://git.linxweiler.xyz/pascallinxweiler/jellyfinplugin/raw/branch/main/dist/oidc-auth_1.0.0.0.zip",
"checksum": "178db5af78c0a5d7cb0d1910338f5fde",
"timestamp": "2026-07-13T00:00:00Z"
"version": "1.0.1.0",
"changelog": "Rebuilt for Jellyfin 10.11 (net9.0).",
"targetAbi": "10.11.0.0",
"sourceUrl": "https://git.linxweiler.xyz/pascallinxweiler/jellyfinplugin/raw/branch/main/dist/oidc-auth_1.0.1.0.zip",
"checksum": "8095740b87cf862ad41bc50ccbdb7443",
"timestamp": "2026-07-13T12:00:00Z"
}
]
}