diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/Security')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs index b4da40702..f6b14fcab 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs @@ -220,7 +220,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security { if (string.IsNullOrWhiteSpace(token)) { - throw new SecurityException("Access token is invalid or expired."); + throw new SecurityException("Access token is required."); } var info = GetTokenInfo(request); diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs index ae5ce796e..509a00ff9 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthorizationContext.cs @@ -62,10 +62,14 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security auth.TryGetValue("Version", out version); } - var token = httpReq.Headers["X-MediaBrowser-Token"]; + var token = httpReq.Headers["X-Emby-Token"]; if (string.IsNullOrWhiteSpace(token)) { + token = httpReq.Headers["X-MediaBrowser-Token"]; + } + if (string.IsNullOrWhiteSpace(token)) + { token = httpReq.QueryString["api_key"]; } |
