28 instantiations of AuthorizationOptions
Microsoft.AspNetCore.Authorization (1)
PassThroughAuthorizationHandler.cs (1)
21public PassThroughAuthorizationHandler() : this(Options.Create(new AuthorizationOptions()))
Microsoft.AspNetCore.Authorization.Test (9)
AuthorizationMiddlewareTests.cs (1)
357var policyProvider = new TestDefaultPolicyProvider(Options.Create(new AuthorizationOptions()), canCache);
AuthorizationPolicyFacts.cs (7)
27var options = new AuthorizationOptions(); 57var options = new AuthorizationOptions(); 77var options = new AuthorizationOptions(); 102var options = new AuthorizationOptions(); 123var options = new AuthorizationOptions(); 143var options = new AuthorizationOptions(); 163var options = new AuthorizationOptions();
DefaultAuthorizationServiceTests.cs (1)
27var provider = new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions()));
Microsoft.AspNetCore.Components.Authorization.Tests (1)
TestAuthorizationPolicyProvider.cs (1)
10private readonly AuthorizationOptions options = new AuthorizationOptions();
Microsoft.AspNetCore.Mvc.Core.Test (8)
ApplicationModels\AuthorizationApplicationModelProviderTest.cs (7)
23new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions())), 41new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions())), 59new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions())), 76var options = Options.Create(new AuthorizationOptions()); 107new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions())), 130var authOptions = Options.Create(new AuthorizationOptions()); 179new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions())),
Authorization\AuthorizeFilterTest.cs (1)
548var options = new AuthorizationOptions();
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
AuthorizeFilterIntegrationTest.cs (2)
59var policyProvider = new Mock<DefaultAuthorizationPolicyProvider>(Options.Create<AuthorizationOptions>(new AuthorizationOptions())); 90var policyProvider = new Mock<DefaultAuthorizationPolicyProvider>(Options.Create<AuthorizationOptions>(new AuthorizationOptions()));
Microsoft.AspNetCore.Mvc.RazorPages.Test (5)
ApplicationModels\AuthorizationPageApplicationModelProviderTest.cs (5)
23var policyProvider = new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions())); 57var policyProvider = new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions())); 76var policyProvider = new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions())); 110var options = Options.Create(new AuthorizationOptions()); 158var policyProvider = new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions()));
Microsoft.AspNetCore.Security.Microbenchmarks (2)
AuthorizationMiddlewareBenchmark.cs (1)
21var policyProvider = new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions()));
AuthorizationPolicyBenchmark.cs (1)
17_policyProvider = new DefaultAuthorizationPolicyProvider(Options.Create(new AuthorizationOptions()));
45 references to AuthorizationOptions
CustomPolicyProvider (1)
Authorization\MinimumAgePolicyProvider.cs (1)
16public MinimumAgePolicyProvider(IOptions<AuthorizationOptions> options)
Microsoft.AspNetCore.Authorization (15)
AuthorizationBuilder.cs (5)
35Services.Configure<AuthorizationOptions>(o => o.InvokeHandlersAfterFailure = invoke); 48Services.Configure<AuthorizationOptions>(o => o.DefaultPolicy = policy); 63Services.Configure<AuthorizationOptions>(o => o.FallbackPolicy = policy); 75Services.Configure<AuthorizationOptions>(o => o.AddPolicy(name, policy)); 87Services.Configure<AuthorizationOptions>(o => o.AddPolicy(name, configurePolicy));
AuthorizationServiceCollectionExtensions.cs (2)
43/// <param name="configure">An action delegate to configure the provided <see cref="AuthorizationOptions"/>.</param> 45public static IServiceCollection AddAuthorizationCore(this IServiceCollection services, Action<AuthorizationOptions> configure)
DefaultAuthorizationPolicyProvider.cs (2)
17private readonly AuthorizationOptions _options; 25public DefaultAuthorizationPolicyProvider(IOptions<AuthorizationOptions> options)
DefaultAuthorizationService.cs (3)
19private readonly AuthorizationOptions _options; 34/// <param name="options">The <see cref="AuthorizationOptions"/> used.</param> 35public DefaultAuthorizationService(IAuthorizationPolicyProvider policyProvider, IAuthorizationHandlerProvider handlers, ILogger<DefaultAuthorizationService> logger, IAuthorizationHandlerContextFactory contextFactory, IAuthorizationEvaluator evaluator, IOptions<AuthorizationOptions> options)
PassThroughAuthorizationHandler.cs (3)
16private readonly AuthorizationOptions _options; 27/// <param name="options">The <see cref="AuthorizationOptions"/> used.</param> 28public PassThroughAuthorizationHandler(IOptions<AuthorizationOptions> options)
Microsoft.AspNetCore.Authorization.Policy (2)
PolicyServiceCollectionExtensions.cs (2)
57/// <param name="configure">An action delegate to configure the provided <see cref="AuthorizationOptions"/>.</param> 59public static IServiceCollection AddAuthorization(this IServiceCollection services, Action<AuthorizationOptions> configure)
Microsoft.AspNetCore.Authorization.Test (20)
AuthorizationBuilderTests.cs (12)
21var options = builder.Services.BuildServiceProvider().GetRequiredService<IOptions<AuthorizationOptions>>().Value; 37var options = builder.Services.BuildServiceProvider().GetRequiredService<IOptions<AuthorizationOptions>>().Value; 52var options = builder.Services.BuildServiceProvider().GetRequiredService<IOptions<AuthorizationOptions>>().Value; 68var options = builder.Services.BuildServiceProvider().GetRequiredService<IOptions<AuthorizationOptions>>().Value; 83var options = builder.Services.BuildServiceProvider().GetRequiredService<IOptions<AuthorizationOptions>>().Value; 97var options = builder.Services.BuildServiceProvider().GetRequiredService<IOptions<AuthorizationOptions>>().Value;
AuthorizationMiddlewareTests.cs (1)
330public TestDefaultPolicyProvider(IOptions<AuthorizationOptions> options, bool canCache) : base(options)
AuthorizationPolicyFacts.cs (7)
27var options = new AuthorizationOptions(); 57var options = new AuthorizationOptions(); 77var options = new AuthorizationOptions(); 102var options = new AuthorizationOptions(); 123var options = new AuthorizationOptions(); 143var options = new AuthorizationOptions(); 163var options = new AuthorizationOptions();
Microsoft.AspNetCore.Components.Authorization.Tests (1)
TestAuthorizationPolicyProvider.cs (1)
10private readonly AuthorizationOptions options = new AuthorizationOptions();
Microsoft.AspNetCore.Mvc.Core (3)
Authorization\AuthorizeFilter.cs (1)
22/// An authorize filter is not meant to be used in combination with <see cref="AuthorizationOptions.FallbackPolicy"/>.
DependencyInjection\MvcCoreMvcCoreBuilderExtensions.cs (2)
108/// <param name="setupAction">An <see cref="Action"/> to configure the <see cref="AuthorizationOptions"/>.</param> 112Action<AuthorizationOptions> setupAction)
Microsoft.AspNetCore.Mvc.Core.Test (1)
Authorization\AuthorizeFilterTest.cs (1)
548var options = new AuthorizationOptions();
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
AuthorizeFilterIntegrationTest.cs (2)
59var policyProvider = new Mock<DefaultAuthorizationPolicyProvider>(Options.Create<AuthorizationOptions>(new AuthorizationOptions())); 90var policyProvider = new Mock<DefaultAuthorizationPolicyProvider>(Options.Create<AuthorizationOptions>(new AuthorizationOptions()));