using System; using System.Linq; using System.Threading.Tasks; using MediaBrowser.Common.Net.Handlers; using MediaBrowser.Controller; using MediaBrowser.Model.DTO; using MediaBrowser.Model.Entities; namespace MediaBrowser.Api.HttpHandlers { class UserAuthenticationHandler : BaseSerializationHandler { protected override async Task GetObjectToSerialize() { Guid userId = Guid.Parse(await GetFormValue("userId").ConfigureAwait(false)); User user = Kernel.Instance.Users.First(u => u.Id == userId); string password = await GetFormValue("password").ConfigureAwait(false); AuthenticationResult result = new AuthenticationResult() { Success = true }; return result; } } }