aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-08-19 18:28:35 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-08-19 18:28:35 -0400
commitfda7ff5bf2795cb03ee2a5355c8003da31bf24f9 (patch)
tree52e7989d001e42b2c14fd50532b9c964f91242af /MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs
parentb48d15296c1708545f358dc0ccbc48fea9b2cf00 (diff)
chromecast updates
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs
index ebb5ab741..19870c435 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Controller.Configuration;
+using System.Collections.Generic;
+using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Session;
@@ -52,12 +53,17 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
ValidateUser(req);
}
+ // TODO: Remove this when all clients have supported the new sescurity
+ private readonly List<string> _updatedClients = new List<string>(){"Dashboard"};
+
private void ValidateUser(IRequest req)
{
//This code is executed before the service
var auth = AuthorizationContext.GetAuthorizationInfo(req);
- if (!string.IsNullOrWhiteSpace(auth.Token) || _config.Configuration.EnableTokenAuthentication)
+ if (!string.IsNullOrWhiteSpace(auth.Token)
+ || _config.Configuration.EnableTokenAuthentication
+ || _updatedClients.Contains(auth.Client ?? string.Empty, StringComparer.OrdinalIgnoreCase))
{
SessionManager.ValidateSecurityToken(auth.Token);
}