9 implementations of IAuthorizationHandler
Microsoft.AspNetCore.Authorization (4)
AssertionRequirement.cs (1)
14public class AssertionRequirement : IAuthorizationHandler, IAuthorizationRequirement
AuthorizationHandler.cs (2)
13public abstract class AuthorizationHandler<TRequirement> : IAuthorizationHandler 42public abstract class AuthorizationHandler<TRequirement, TResource> : IAuthorizationHandler
PassThroughAuthorizationHandler.cs (1)
14public class PassThroughAuthorizationHandler : IAuthorizationHandler
Microsoft.AspNetCore.Authorization.Test (3)
AuthorizationMiddlewareTests.cs (1)
1061public class TestAuthorizationHandler : IAuthorizationHandler
DefaultAuthorizationServiceTests.cs (2)
142private class FailHandler : IAuthorizationHandler 154private class ReasonableFailHandler : IAuthorizationHandler
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTests.cs (1)
2303private class TestAuthHandler : IAuthorizationHandler
TestAuthHandler.cs (1)
10public class TestAuthHandler : IAuthorizationHandler
50 references to IAuthorizationHandler
BasicWebSite (2)
StartupWithoutEndpointRouting.cs (2)
24services.AddTransient<IAuthorizationHandler, ManagerHandler>(); 40services.AddTransient<IAuthorizationHandler, ManagerHandler>();
CustomAuthorizationFailureResponse (3)
Startup.cs (3)
48services.AddTransient<IAuthorizationHandler, SampleRequirementHandler>(); 49services.AddTransient<IAuthorizationHandler, SampleWithCustomMessageRequirementHandler>(); 50services.AddTransient<IAuthorizationHandler, SampleWithFailureReasonRequirementHandler>();
CustomPolicyProvider (1)
Startup.cs (1)
23services.AddSingleton<IAuthorizationHandler, MinimumAgeAuthorizationHandler>();
Microsoft.AspNetCore.Authorization (22)
AssertionRequirement.cs (1)
11/// Implements an <see cref="IAuthorizationHandler"/> and <see cref="IAuthorizationRequirement"/>
AuthorizationFailure.cs (1)
30/// Allows <see cref="IAuthorizationHandler"/> to flow more detailed reasons for why authorization failed.
AuthorizationFailureReason.cs (3)
16public AuthorizationFailureReason(IAuthorizationHandler handler, string message) 28/// The <see cref="IAuthorizationHandler"/> responsible for this failure reason. 30public IAuthorizationHandler Handler { get; }
AuthorizationHandlerContext.cs (1)
13/// Contains authorization information used by <see cref="IAuthorizationHandler"/>.
AuthorizationServiceCollectionExtensions.cs (1)
35services.TryAddEnumerable(ServiceDescriptor.Transient<IAuthorizationHandler, PassThroughAuthorizationHandler>());
ClaimsAuthorizationRequirement.cs (1)
13/// Implements an <see cref="IAuthorizationHandler"/> and <see cref="IAuthorizationRequirement"/>
DefaultAuthorizationHandlerProvider.cs (5)
13/// which provides the <see cref="IAuthorizationHandler"/>s for an authorization request. 17private readonly Task<IEnumerable<IAuthorizationHandler>> _handlersTask; 22/// <param name="handlers">The <see cref="IAuthorizationHandler"/>s.</param> 23public DefaultAuthorizationHandlerProvider(IEnumerable<IAuthorizationHandler> handlers) 31public Task<IEnumerable<IAuthorizationHandler>> GetHandlersAsync(AuthorizationHandlerContext context)
DefaultAuthorizationService.cs (1)
68foreach (var handler in handlers)
DenyAnonymousAuthorizationRequirement.cs (1)
10/// Implements an <see cref="IAuthorizationHandler"/> and <see cref="IAuthorizationRequirement"/> which requires the current user must be authenticated.
IAuthorizationHandlerProvider.cs (2)
10/// A type which can provide the <see cref="IAuthorizationHandler"/>s for an authorization request. 19Task<IEnumerable<IAuthorizationHandler>> GetHandlersAsync(AuthorizationHandlerContext context);
NameAuthorizationRequirement.cs (1)
12/// Implements an <see cref="IAuthorizationHandler"/> and <see cref="IAuthorizationRequirement"/>
PassThroughAuthorizationHandler.cs (3)
12/// be its own <see cref="IAuthorizationHandler"/>. 37foreach (var handler in context.Requirements.OfType<IAuthorizationHandler>())
RolesAuthorizationRequirement.cs (1)
13/// Implements an <see cref="IAuthorizationHandler"/> and <see cref="IAuthorizationRequirement"/>
Microsoft.AspNetCore.Authorization.Test (20)
AuthorizationMiddlewareTests.cs (1)
982builder.Services.AddScoped<IAuthorizationHandler, TestAuthorizationHandler>();
DefaultAuthorizationServiceTests.cs (18)
101services.AddSingleton<IAuthorizationHandler>(handler1); 102services.AddSingleton<IAuthorizationHandler>(handler2); 126services.AddSingleton<IAuthorizationHandler>(handler1); 127services.AddSingleton<IAuthorizationHandler>(handler2); 178services.AddSingleton<IAuthorizationHandler>(handler1); 179services.AddSingleton<IAuthorizationHandler>(handler2); 180services.AddSingleton<IAuthorizationHandler>(handler3); 661services.AddTransient<IAuthorizationHandler, CustomHandler>(); 845services.AddSingleton<IAuthorizationHandler>(new ExpenseReportAuthorizationHandler(new OperationAuthorizationRequirement[] { Operations.Edit })); 846services.AddTransient<IAuthorizationHandler, SuperUserHandler>(); 889services.AddTransient<IAuthorizationHandler, EvenHandler>(); 910services.AddTransient<IAuthorizationHandler, NotCalledHandler>(); 931services.AddSingleton<IAuthorizationHandler>(new ExpenseReportAuthorizationHandler(new OperationAuthorizationRequirement[] { Operations.Edit })); 948services.AddSingleton<IAuthorizationHandler>(new ExpenseReportAuthorizationHandler(new OperationAuthorizationRequirement[] { Operations.Edit })); 1133public Task<IEnumerable<IAuthorizationHandler>> GetHandlersAsync(AuthorizationHandlerContext context) 1135return Task.FromResult<IEnumerable<IAuthorizationHandler>>(new IAuthorizationHandler[1] { new FailHandler() }); 1233services.AddSingleton<IAuthorizationHandler, FailHandler>();
PassThroughAuthorizationHandlerTests.cs (1)
37services.AddSingleton<IAuthorizationHandler>(afterHandler);
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTests.cs (1)
2340services.AddSingleton<IAuthorizationHandler, TestAuthHandler>();
Startup.cs (1)
70services.AddSingleton<IAuthorizationHandler, TestAuthHandler>();