100 references to Authorize
Aspire.Dashboard (3)
Otlp\Grpc\OtlpGrpcLogsService.cs (1)
12
[
Authorize
(Policy = OtlpAuthorization.PolicyName)]
Otlp\Grpc\OtlpGrpcMetricsService.cs (1)
12
[
Authorize
(Policy = OtlpAuthorization.PolicyName)]
Otlp\Grpc\OtlpGrpcTraceService.cs (1)
12
[
Authorize
(Policy = OtlpAuthorization.PolicyName)]
Aspire.Hosting (1)
Dashboard\DashboardService.cs (1)
20
[
Authorize
(Policy = ResourceServiceApiKeyAuthorization.PolicyName)]
BasicWebSite (1)
Controllers\AuthorizeUserController.cs (1)
18
[
Authorize
(Roles = "Administrator")]
ClaimsTransformation (1)
Controllers\HomeController.cs (1)
18
[
Authorize
]
Cookies (1)
Controllers\HomeController.cs (1)
18
[
Authorize
]
CustomAuthorizationFailureResponse (3)
Controllers\SampleController.cs (3)
15
[
Authorize
(Policy = SamplePolicyNames.CustomPolicyWithCustomForbiddenMessage)]
22
[
Authorize
(Policy = SamplePolicyNames.CustomPolicy)]
29
[
Authorize
(Policy = SamplePolicyNames.FailureReasonPolicy)]
IdentitySample.Mvc (2)
Controllers\AccountController.cs (1)
15
[
Authorize
]
Controllers\ManageController.cs (1)
13
[
Authorize
]
Microsoft.AspNetCore.Authorization.Policy (3)
AuthorizationEndpointConventionBuilderExtensions.cs (3)
28
return builder.RequireAuthorization(new
AuthorizeAttribute
());
69
authorizeData = new IAuthorizeData[] { new
AuthorizeAttribute
(), };
142
endpointBuilder.Metadata.Add(new
AuthorizeAttribute
());
Microsoft.AspNetCore.Authorization.Test (38)
AuthorizationAppBuilderExtensionsTests.cs (1)
29
new EndpointMetadataCollection(new
AuthorizeAttribute
()),
AuthorizationEndpointConventionBuilderExtensionsTests.cs (3)
17
var metadata = new
AuthorizeAttribute
();
173
var authorize = new
AuthorizeAttribute
();
200
var authorize = new
AuthorizeAttribute
();
AuthorizationMiddlewareTests.cs (23)
115
var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new
AuthorizeAttribute
()), authenticationService: authenticationService);
136
var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new
AuthorizeAttribute
()), authenticationService: authenticationService);
158
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
() { AuthenticationSchemes = "whatever" }), authenticationService: authenticationService);
180
var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new
AuthorizeAttribute
()), authenticationService: authenticationService);
433
var context = GetHttpContext(anonymous: false, endpoint: CreateEndpoint(new
AuthorizeAttribute
(), policy));
513
var context = GetHttpContext(anonymous: false, endpoint: CreateEndpoint(new
AuthorizeAttribute
(), new ReqAttribute(req)));
553
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()));
573
var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new
AuthorizeAttribute
(), new AllowAnonymousAttribute()), authenticationService: authenticationService);
594
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()), authenticationService: authenticationService);
616
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()), authenticationService: authenticationService);
638
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()));
662
var endpoint = CreateEndpoint(new
AuthorizeAttribute
());
691
var endpoint = CreateEndpoint(new
AuthorizeAttribute
());
712
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()), authenticationService: authenticationService);
734
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()), authenticationService: authenticationService);
757
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()), authenticationService: authenticationService);
778
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()));
802
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
(), new AllowAnonymousAttribute()), authenticationService: authenticationService);
842
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()), authenticationService: authenticationService.Object);
865
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()));
891
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()));
930
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()), authenticationService: authenticationService.Object);
956
var context = GetHttpContext(endpoint: CreateEndpoint(new
AuthorizeAttribute
()));
AuthorizationPolicyFacts.cs (9)
22
new
AuthorizeAttribute
(),
25
new
AuthorizeAttribute
{ Roles = "r1,r2", AuthenticationSchemes = "roles" },
51
new
AuthorizeAttribute
(),
52
new
AuthorizeAttribute
(),
74
new
AuthorizeAttribute
(),
100
new
AuthorizeAttribute
() { Roles = "r1 , r2" }
121
new
AuthorizeAttribute
() { AuthenticationSchemes = "a1 , a2" }
141
new
AuthorizeAttribute
() { AuthenticationSchemes = "a1 , , ,,, a2" }
161
new
AuthorizeAttribute
() { Roles = "r1 , ,, , r2" }
DefaultAuthorizationServiceTests.cs (1)
31
new
AuthorizeAttribute
{ Policy = "Wut" }
MetadataTest.cs (1)
14
var metadata = new
AuthorizeAttribute
();
Microsoft.AspNetCore.Components.Authorization.Tests (2)
AuthorizeRouteViewTest.cs (1)
379
[
Authorize
]
AuthorizeViewTest.cs (1)
575
=> new[] { new
AuthorizeAttribute
{ AuthenticationSchemes = "test scheme" } };
Microsoft.AspNetCore.Components.Endpoints.Tests (4)
RazorComponentEndpointFactoryTest.cs (4)
29
new object[] { new
AuthorizeAttribute
() }),
60
builder => builder.Metadata.Add(new
AuthorizeAttribute
())
89
builder => builder.Metadata.Add(new
AuthorizeAttribute
())
144
builder => builder.Metadata.Add(new
AuthorizeAttribute
())
Microsoft.AspNetCore.Http.Connections.Tests (6)
HttpConnectionDispatcherTests.cs (2)
3962
[
Authorize
]
3989
[
Authorize
(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
MapConnectionHandlerTests.cs (4)
163
options.AuthorizationData.Add(new
AuthorizeAttribute
());
222
options.AuthorizationData.Add(new
AuthorizeAttribute
());
466
[
Authorize
]
471
[
Authorize
]
Microsoft.AspNetCore.Mvc.Core (1)
Authorization\AuthorizeFilter.cs (1)
31
: this(authorizeData: new[] { new
AuthorizeAttribute
() })
Microsoft.AspNetCore.Mvc.Core.Test (12)
ApiConventionTypeAttributeTest.cs (2)
60
var attributes = new Attribute[] { new ProducesAttribute(typeof(object)), new ServiceFilterAttribute(typeof(object)), new
AuthorizeAttribute
() };
75
[
Authorize
]
ApplicationModels\AuthorizationApplicationModelProviderTest.cs (3)
219
[
Authorize
(Policy = "Base")]
227
[
Authorize
(Policy = "Derived")]
233
[
Authorize
]
Authorization\AuthorizeFilterTest.cs (7)
56
var authorizeFilter = new AuthorizeFilter(new[] { new
AuthorizeAttribute
() });
72
var authorizeFilter = new AuthorizeFilter(new[] { new
AuthorizeAttribute
() });
259
new
AuthorizeAttribute
{ Policy = "true"},
260
new
AuthorizeAttribute
{ Policy = "false"}
283
new
AuthorizeAttribute
{ Policy = "true"},
284
new
AuthorizeAttribute
{ Policy = "false"}
457
new AuthorizeFilter(new[] { new
AuthorizeAttribute
()}),
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
AuthorizeFilterIntegrationTest.cs (1)
215
[
Authorize
(Policy = "Base")]
Microsoft.AspNetCore.Mvc.RazorPages.Test (5)
ApplicationModels\AuthorizationPageApplicationModelProviderTest.cs (4)
47
[
Authorize
]
98
[
Authorize
]
141
[
Authorize
(Policy = "Base")]
146
[
Authorize
(Policy = "Derived")]
ApplicationModels\ResponseCacheFilterApplicationModelProviderTest.cs (1)
44
[
Authorize
]
Microsoft.AspNetCore.Routing.Tests (1)
TestObjects\TestMatcherFactory.cs (1)
70
metadataList.Add(new
AuthorizeAttribute
());
Microsoft.AspNetCore.SignalR.Tests (5)
AuthConnectionHandler.cs (1)
11
[
Authorize
]
AuthHub.cs (1)
8
[
Authorize
]
MapSignalRTests.cs (3)
240
options.AuthorizationData.Add(new
AuthorizeAttribute
());
377
[
Authorize
]
386
[
Authorize
]
Negotiate.Server (2)
Controllers\AuthController.cs (2)
26
[
Authorize
]
39
[
Authorize
]
PathSchemeSelection (1)
Controllers\HomeController.cs (1)
18
[
Authorize
]
RazorPagesWebSite (2)
Controllers\AuthorizedActionController.cs (1)
10
[
Authorize
]
Pages\ModelWithAuthFilter.cs (1)
10
[
Authorize
]
SecurityWebSite (5)
Controllers\AdministrationController.cs (1)
22
[
Authorize
(AuthenticationSchemes = "Cookie2")]
Controllers\AuthorizedController.cs (2)
9
[
Authorize
] // requires any authenticated user (aka the application cookie typically)
12
[
Authorize
(AuthenticationSchemes = "Bearer")]
Controllers\HomeController.cs (2)
17
[
Authorize
]
24
[
Authorize
]