aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Net/AuthenticatedAttribute.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Net/AuthenticatedAttribute.cs')
-rw-r--r--MediaBrowser.Controller/Net/AuthenticatedAttribute.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Net/AuthenticatedAttribute.cs b/MediaBrowser.Controller/Net/AuthenticatedAttribute.cs
index 567d20f39..329dbaa46 100644
--- a/MediaBrowser.Controller/Net/AuthenticatedAttribute.cs
+++ b/MediaBrowser.Controller/Net/AuthenticatedAttribute.cs
@@ -8,6 +8,12 @@ namespace MediaBrowser.Controller.Net
public IAuthService AuthService { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether or not to allow local unauthenticated access.
+ /// </summary>
+ /// <value><c>true</c> if [allow local]; otherwise, <c>false</c>.</value>
+ public bool AllowLocal { get; set; }
+
+ /// <summary>
/// The request filter is executed before the service.
/// </summary>
/// <param name="request">The http request wrapper</param>
@@ -15,7 +21,7 @@ namespace MediaBrowser.Controller.Net
/// <param name="requestDto">The request DTO</param>
public void RequestFilter(IRequest request, IResponse response, object requestDto)
{
- AuthService.Authenticate(request, response, requestDto);
+ AuthService.Authenticate(request, response, requestDto, AllowLocal);
}
/// <summary>