From ea92065df0321039b4a6433e9f5d2a7269d720a6 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 11 Feb 2015 22:54:31 -0500 Subject: sync updates --- .../HttpServer/Security/AuthorizationContext.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'MediaBrowser.Server.Implementations/HttpServer') diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs index 4e9899301..cd4d23f5c 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs @@ -129,6 +129,20 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security if (tokenInfo != null) { info.UserId = tokenInfo.UserId; + + // TODO: Remove these checks for IsNullOrWhiteSpace + if (string.IsNullOrWhiteSpace(info.Client)) + { + info.Client = tokenInfo.AppName; + } + if (string.IsNullOrWhiteSpace(info.Device)) + { + info.Device = tokenInfo.DeviceName; + } + if (string.IsNullOrWhiteSpace(info.DeviceId)) + { + info.DeviceId = tokenInfo.DeviceId; + } } httpReq.Items["OriginalAuthenticationInfo"] = tokenInfo; } -- cgit v1.2.3