Merge pull request #2712 from joshuaboniface/fix-ldap-issues

Revert #2146 ordering change

(cherry picked from commit 9e82e7c847)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
pull/2847/head
dkanada 5 years ago committed by Joshua M. Boniface
parent 899be44388
commit 54435a1243

@ -1401,6 +1401,16 @@ namespace Emby.Server.Implementations.Session
user = _userManager.GetUserByName(request.Username);
}
if (enforcePassword)
{
user = await _userManager.AuthenticateUser(
request.Username,
request.Password,
request.PasswordSha1,
request.RemoteEndPoint,
true).ConfigureAwait(false);
}
if (user == null)
{
AuthenticationFailed?.Invoke(this, new GenericEventArgs<AuthenticationRequest>(request));
@ -1413,16 +1423,6 @@ namespace Emby.Server.Implementations.Session
throw new SecurityException("User is not allowed access from this device.");
}
if (enforcePassword)
{
user = await _userManager.AuthenticateUser(
request.Username,
request.Password,
request.PasswordSha1,
request.RemoteEndPoint,
true).ConfigureAwait(false);
}
var token = GetAuthorizationToken(user, request.DeviceId, request.App, request.AppVersion, request.DeviceName);
var session = LogSessionActivity(

Loading…
Cancel
Save