aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-11 22:54:31 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-11 22:54:31 -0500
commitea92065df0321039b4a6433e9f5d2a7269d720a6 (patch)
treef757d6ee2154e31e3ce10c286d175189146235af /MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
parent306c5041f032a539612522d9acdd59596b075719 (diff)
sync updates
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs14
1 files changed, 14 insertions, 0 deletions
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;
}