5 implementations of IAuthorizationService
Microsoft.AspNetCore.Authorization (1)
DefaultAuthorizationService.cs (1)
17public class DefaultAuthorizationService : IAuthorizationService
Microsoft.AspNetCore.Authorization.Test (2)
PolicyEvaluatorTests.cs (2)
169public class HappyAuthorization : IAuthorizationService 178public class SadAuthorization : IAuthorizationService
Microsoft.AspNetCore.Components.Authorization.Tests (2)
TestAsyncAuthorizationService.cs (1)
9public class TestAsyncAuthorizationService : IAuthorizationService
TestAuthorizationService.cs (1)
9public class TestAuthorizationService : IAuthorizationService
83 references to IAuthorizationService
Aspire.Dashboard (3)
Authentication\AspirePolicyEvaluator.cs (3)
20private readonly IAuthorizationService _authorization; 26public AspirePolicyEvaluator(IAuthorizationService authorization) 93/// Attempts authorization for a policy using <see cref="IAuthorizationService"/>.
Microsoft.AspNetCore.Authorization (17)
AuthorizationBuilder.cs (2)
58/// default <see cref="IAuthorizationService"/>. 68/// Adds a <see cref="AuthorizationPolicy"/> which can be used by <see cref="IAuthorizationService"/>.
AuthorizationFailure.cs (1)
11/// Encapsulates a failure result of <see cref="IAuthorizationService.AuthorizeAsync(ClaimsPrincipal, object, IEnumerable{IAuthorizationRequirement})"/>.
AuthorizationOptions.cs (2)
12/// Provides programmatic configuration used by <see cref="IAuthorizationService"/> and <see cref="IAuthorizationPolicyProvider"/>. 40/// default <see cref="IAuthorizationService"/>.
AuthorizationResult.cs (1)
11/// Encapsulates the result of <see cref="IAuthorizationService.AuthorizeAsync(ClaimsPrincipal, object, IEnumerable{IAuthorizationRequirement})"/>.
AuthorizationServiceCollectionExtensions.cs (1)
30services.TryAdd(ServiceDescriptor.Transient<IAuthorizationService, DefaultAuthorizationService>());
AuthorizationServiceExtensions.cs (9)
12/// Extension methods for <see cref="IAuthorizationService"/>. 19/// <param name="service">The <see cref="IAuthorizationService"/> providing authorization.</param> 27public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, IAuthorizationRequirement requirement) 38/// <param name="service">The <see cref="IAuthorizationService"/> providing authorization.</param> 46public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, AuthorizationPolicy policy) 57/// <param name="service">The <see cref="IAuthorizationService"/> providing authorization.</param> 64public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, AuthorizationPolicy policy) 75/// <param name="service">The <see cref="IAuthorizationService"/> providing authorization.</param> 82public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, string policyName)
DefaultAuthorizationService.cs (1)
15/// The default implementation of an <see cref="IAuthorizationService"/>.
Microsoft.AspNetCore.Authorization.Policy (4)
IPolicyEvaluator.cs (1)
25/// Attempts authorization for a policy using <see cref="IAuthorizationService"/>.
PolicyEvaluator.cs (3)
16private readonly IAuthorizationService _authorization; 22public PolicyEvaluator(IAuthorizationService authorization) 82/// Attempts authorization for a policy using <see cref="IAuthorizationService"/>.
Microsoft.AspNetCore.Authorization.Test (52)
DefaultAuthorizationServiceTests.cs (49)
14private IAuthorizationService BuildAuthorizationService(Action<IServiceCollection> setupServices = null) 21return services.BuildServiceProvider().GetRequiredService<IAuthorizationService>(); 39var authorizationService = BuildAuthorizationService(services => 54var authorizationService = BuildAuthorizationService(services => 75var authorizationService = BuildAuthorizationService(services => 99var authorizationService = BuildAuthorizationService(services => 124var authorizationService = BuildAuthorizationService(services => 176var authorizationService = BuildAuthorizationService(services => 203var authorizationService = BuildAuthorizationService(services => 225var authorizationService = BuildAuthorizationService(services => 246var authorizationService = BuildAuthorizationService(services => 267var authorizationService = BuildAuthorizationService(services => 286var authorizationService = BuildAuthorizationService(services => 300var authorizationService = BuildAuthorizationService(services => 315var authorizationService = BuildAuthorizationService(services => 336var authorizationService = BuildAuthorizationService(); 350var authorizationService = BuildAuthorizationService(); 372var authorizationService = BuildAuthorizationService(); 393var authorizationService = BuildAuthorizationService(); 410var authorizationService = BuildAuthorizationService(); 427var authorizationService = BuildAuthorizationService(); 443var authorizationService = BuildAuthorizationService(); 463var authorizationService = BuildAuthorizationService(services => 490var authorizationService = BuildAuthorizationService(services => 511var authorizationService = BuildAuthorizationService(services => 537var authorizationService = BuildAuthorizationService(services => 559var authorizationService = BuildAuthorizationService(services => 581var authorizationService = BuildAuthorizationService(services => 606var authorizationService = BuildAuthorizationService(services => 639var authorizationService = BuildAuthorizationService(services => 659var authorizationService = BuildAuthorizationService(services => 701var authorizationService = BuildAuthorizationService(services => 721var authorizationService = BuildAuthorizationService(services => 749var authorizationService = BuildAuthorizationService(services => 776var authorizationService = BuildAuthorizationService(services => 843var authorizationService = BuildAuthorizationService(services => 887var authorizationService = BuildAuthorizationService(services => 908var authorizationService = BuildAuthorizationService(services => 929var authorizationService = BuildAuthorizationService(services => 946var authorizationService = BuildAuthorizationService(services => 960var authorizationService = BuildAuthorizationService(services => 979var authorizationService = BuildAuthorizationService(services => 1016var authorizationService = BuildAuthorizationService(services => 1055var authorizationService = BuildAuthorizationService(services => 1082var authorizationService = BuildAuthorizationService(services => 1123var authorizationService = BuildAuthorizationService(services => 1142var authorizationService = BuildAuthorizationService(services => 1198var authorizationService = BuildAuthorizationService(services => 1231var authorizationService = BuildAuthorizationService(services =>
PassThroughAuthorizationHandlerTests.cs (3)
12private IAuthorizationService BuildAuthorizationService(Action<IServiceCollection> setupServices = null) 19return services.BuildServiceProvider().GetRequiredService<IAuthorizationService>(); 30var authorizationService = BuildAuthorizationService(services =>
Microsoft.AspNetCore.Components.Authorization (1)
AuthorizeViewCore.cs (1)
48[Inject] private IAuthorizationService AuthorizationService { get; set; } = default!;
Microsoft.AspNetCore.Components.Authorization.Tests (2)
AuthorizeRouteViewTest.cs (1)
33serviceCollection.AddSingleton<IAuthorizationService>(_testAuthorizationService);
AuthorizeViewTest.cs (1)
564public TestRenderer CreateTestRenderer(IAuthorizationService authorizationService)
Microsoft.AspNetCore.SignalR.Core (2)
Internal\DefaultHubDispatcher.cs (2)
678var authService = provider.GetRequiredService<IAuthorizationService>();
SecurityWebSite (1)
CountingPolicyEvaluator.cs (1)
14public CountingPolicyEvaluator(IAuthorizationService authorization) : base(authorization) { }
StaticFilesAuth (1)
Startup.cs (1)
70public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IAuthorizationService authorizationService)