Moving AllowAnonymous attribute from MVC

This commit is contained in:
Ajay Bhargav Baaskaran 2015-10-15 12:33:01 -07:00
parent 121e6891e7
commit 0f78135f5d
3 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,12 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.AspNet.Authorization
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class AllowAnonymousAttribute : Attribute, IAllowAnonymous
{
}
}

View File

@ -57,7 +57,7 @@ namespace Microsoft.AspNet.Authorization
return builder.Build();
}
public static AuthorizationPolicy Combine(AuthorizationOptions options, IEnumerable<AuthorizeAttribute> attributes)
public static AuthorizationPolicy Combine(AuthorizationOptions options, IEnumerable<IAuthorizeData> attributes)
{
if (options == null)
{

View File

@ -0,0 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNet.Authorization
{
public interface IAllowAnonymous
{
}
}