aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Session/SessionManager.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2020-04-01 18:53:22 +0200
committerBond_009 <bond.009@outlook.com>2020-04-01 18:53:22 +0200
commit787049f35f849c5eb013ec8588068055c351e074 (patch)
treebf6a0ba6c1e5fdba81363a8cde604f5930c70793 /Emby.Server.Implementations/Session/SessionManager.cs
parente699e5d405792a598fdf6d0e723db52555af0492 (diff)
parent58900bb57e2a0dc4ca3505fe9e21419b9cf84a37 (diff)
Merge branch 'master' into minor
Diffstat (limited to 'Emby.Server.Implementations/Session/SessionManager.cs')
-rw-r--r--Emby.Server.Implementations/Session/SessionManager.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index dfcd3843c..de768333d 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -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(