mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[PR #14729] [CLOSED] Refactor authentication #14085
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/14729
Author: @stenlan
Created: 9/1/2025
Status: ❌ Closed
Base:
master← Head:feature/totp-mfa📝 Commits (10+)
118e0deStart rename of some fieldsfae2293More refactoring progress4bad9f3More progress3af6f5dRename & move authenticationResult2138df1More progresse9d7247Authentication refactorf177fe3Fix provider resolving63f4786Databse migration6844458Fix capabilities null reference exceptionf4b061dAdd remote endpoint to Quick Connect session creation📊 Changes
57 files changed (+5584 additions, -2658 deletions)
View changed files
📝
Directory.Packages.props(+3 -2)📝
Emby.Server.Implementations/ApplicationHost.cs(+57 -6)➖
Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs(+0 -231)📝
Emby.Server.Implementations/Session/SessionManager.cs(+43 -69)📝
Jellyfin.Api/Controllers/QuickConnectController.cs(+80 -22)📝
Jellyfin.Api/Controllers/SessionController.cs(+10 -3)📝
Jellyfin.Api/Controllers/StartupController.cs(+13 -2)📝
Jellyfin.Api/Controllers/UserController.cs(+144 -35)📝
Jellyfin.Api/Jellyfin.Api.csproj(+1 -0)📝
Jellyfin.Api/Models/UserDtos/AuthenticateUserByName.cs(+5 -0)➕
Jellyfin.Api/Models/UserDtos/SetUserMFADto.cs(+15 -0)📝
Jellyfin.Api/Models/UserDtos/UpdateUserPassword.cs(+5 -0)📝
Jellyfin.Server.Implementations/Devices/DeviceManager.cs(+5 -0)📝
Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj(+1 -0)📝
Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs(+183 -61)📝
Jellyfin.Server.Implementations/Users/DefaultPasswordResetProvider.cs(+14 -2)➖
Jellyfin.Server.Implementations/Users/InvalidAuthProvider.cs(+0 -36)➕
Jellyfin.Server.Implementations/Users/LegacyPlaceholderAuthenticationProvider.cs(+22 -0)➕
Jellyfin.Server.Implementations/Users/QuickConnectManager.cs(+91 -0)➕
Jellyfin.Server.Implementations/Users/UserAuthenticationManager.cs(+352 -0)...and 37 more files
📄 Description
Draft pull request for maintainers to already see the structure of the changes that I want to make.
Will need to fix tests,
a circular dependency issue(done),model migrations(done),and in-code documentation(done). More documentation to follow.Changes
IUserAuthenticationManager, and decouples it from the username/password type of authentication and instead makes it fully generic. Added some easy to use abstract building blocks for authentication providers;AbstractAuthenticationProvider(used by username password auth)AbstractExternallyTriggeredAuthenticationProvider(used by quick connect auth)AbstractChallengeResponseAuthenticationProvider(WIP; can be used by general challenge-response type authentication providers).IAuthenticationProviderinterface to a genericIAuthenticationProvider<T>interface, where T is the type of payload data that an authentication provider takes upon authentication, so that multiple types of authentication can be supported.Issues
Fixes #1215.
Completes this feature request
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.