mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[PR #1209] [MERGED] Override username with AuthenticationProvider #8698
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/1209
Author: @joshuaboniface
Created: 4/8/2019
Status: ✅ Merged
Merged: 4/10/2019
Merged by: @joshuaboniface
Base:
release-10.3.z← Head:hotfix-authprovider-create📝 Commits (1)
1af9c04Override 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.