diff options
Diffstat (limited to 'Emby.Server.Implementations')
3 files changed, 6 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index 3b11a4767..89b7198ca 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -182,7 +182,7 @@ namespace Emby.Server.Implementations.Library } } - public Task<bool> AuthenticateUser(string username, string passwordSha1, string remoteEndPoint) + public Task<User> AuthenticateUser(string username, string passwordSha1, string remoteEndPoint) { return AuthenticateUser(username, passwordSha1, null, remoteEndPoint); } @@ -226,7 +226,7 @@ namespace Emby.Server.Implementations.Library return builder.ToString(); } - public async Task<bool> AuthenticateUser(string username, string passwordSha1, string passwordMd5, string remoteEndPoint) + public async Task<User> AuthenticateUser(string username, string passwordSha1, string passwordMd5, string remoteEndPoint) { if (string.IsNullOrWhiteSpace(username)) { @@ -307,7 +307,7 @@ namespace Emby.Server.Implementations.Library _logger.Info("Authentication request for {0} {1}.", user.Name, success ? "has succeeded" : "has been denied"); - return success; + return success ? user : null; } private async Task UpdateInvalidLoginAttemptCount(User user, int newValue) diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs index 74b8a7764..10b7132a1 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs @@ -227,11 +227,6 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts throw new LiveTvConflictException(); } - protected virtual bool EnableMediaProbing - { - get { return false; } - } - protected async Task<bool> IsAvailable(TunerHostInfo tuner, string channelId, CancellationToken cancellationToken) { try diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 8051b7848..05a240cea 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -1404,12 +1404,14 @@ namespace Emby.Server.Implementations.Session { var result = await _userManager.AuthenticateUser(request.Username, request.PasswordSha1, request.PasswordMd5, request.RemoteEndPoint).ConfigureAwait(false); - if (!result) + if (result == null) { EventHelper.FireEventIfNotNull(AuthenticationFailed, this, new GenericEventArgs<AuthenticationRequest>(request), _logger); throw new SecurityException("Invalid user or password entered."); } + + user = result; } var token = await GetAuthorizationToken(user.Id.ToString("N"), request.DeviceId, request.App, request.AppVersion, request.DeviceName).ConfigureAwait(false); |
