aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-07-03 22:22:57 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-07-03 22:22:57 -0400
commit7fa9b14f56eabbb06e38726879b3cddc47b8e8fb (patch)
tree68c33977dc4f71cb3decae62c071887b9f914fc1 /MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
parent59dc591f66c20b6417aa2baa9503a154585386f9 (diff)
fixes #762 - Marking unwatched doesn't update display
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
index 77343ab4e..94be37e95 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
@@ -36,6 +36,13 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
auth.TryGetValue("Version", out version);
}
+ var token = httpReq.Headers["X-MediaBrowser-Token"];
+
+ if (string.IsNullOrWhiteSpace(token))
+ {
+ token = httpReq.QueryString["api_key"];
+ }
+
return new AuthorizationInfo
{
Client = client,
@@ -43,7 +50,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
DeviceId = deviceId,
UserId = userId,
Version = version,
- Token = httpReq.Headers["X-AUTH-TOKEN"]
+ Token = token
};
}