[PR #1209] [MERGED] Override username with AuthenticationProvider #8698

Closed
opened 2026-02-07 05:48:45 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/1209
Author: @joshuaboniface
Created: 4/8/2019
Status: Merged
Merged: 4/10/2019
Merged by: @joshuaboniface

Base: release-10.3.zHead: hotfix-authprovider-create


📝 Commits (1)

  • 1af9c04 Override username with AuthenticationProvider

📊 Changes

1 file changed (+33 additions, -11 deletions)

View changed files

📝 Emby.Server.Implementations/Library/UserManager.cs (+33 -11)

📄 Description

Changes
Pass back the Username directive returned by an AuthenticationProvider
to the calling code, so we may override the user-provided Username
value if the authentication provider passes this back. Useful for
instance in an LDAP scenario where what the user types may not
necessarily be the "username" that is mapped in the system, e.g.
the user providing 'mail' while 'uid' is the "username" value.
Could also then be extensible to other authentication providers
as well, should they wish to do a similar thing.

We might extend this to other fields too, specifically isAdmin. This is not likely to ever be needed, since the user doesn't enter this anywhere like they do with the "username".

Also enforces that AuthProvider plugins must do the user creation for non-default AuthProviders, which the LDAP plugin is already doing - otherwise we get duplicate users. Instead, we just search again.

Issues
N/A


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/1209 **Author:** [@joshuaboniface](https://github.com/joshuaboniface) **Created:** 4/8/2019 **Status:** ✅ Merged **Merged:** 4/10/2019 **Merged by:** [@joshuaboniface](https://github.com/joshuaboniface) **Base:** `release-10.3.z` ← **Head:** `hotfix-authprovider-create` --- ### 📝 Commits (1) - [`1af9c04`](https://github.com/jellyfin/jellyfin/commit/1af9c047fbc0283f7abfb4b98918454258dfb348) Override username with AuthenticationProvider ### 📊 Changes **1 file changed** (+33 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/Library/UserManager.cs` (+33 -11) </details> ### 📄 Description **Changes** Pass back the Username directive returned by an AuthenticationProvider to the calling code, so we may override the user-provided Username value if the authentication provider passes this back. Useful for instance in an LDAP scenario where what the user types may not necessarily be the "username" that is mapped in the system, e.g. the user providing 'mail' while 'uid' is the "username" value. Could also then be extensible to other authentication providers as well, should they wish to do a similar thing. ~~We might extend this to other fields too, specifically isAdmin.~~ This is not likely to ever be needed, since the user doesn't enter this anywhere like they do with the "username". Also enforces that AuthProvider plugins must do the user creation for non-default AuthProviders, which the LDAP plugin is already doing - otherwise we get duplicate users. Instead, we just search again. **Issues** N/A --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 05:48:45 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#8698