1 write to Resource
Microsoft.AspNetCore.Authorization (1)
AuthorizationHandlerContext.cs (1)
37Resource = resource;
9 references to Resource
Microsoft.AspNetCore.Authorization (1)
AuthorizationHandler.cs (1)
51if (context.Resource is TResource resource)
Microsoft.AspNetCore.Authorization.Test (3)
AuthorizationMiddlewareTests.cs (2)
654resource = c.Resource as HttpContext; 683resource = c.Resource;
PolicyEvaluatorTests.cs (1)
91var policy = new AuthorizationPolicyBuilder().RequireAssertion(c => c.Resource != null).Build();
Microsoft.AspNetCore.Mvc.Core.Test (1)
Authorization\AuthorizeFilterTest.cs (1)
377var authorizeFilter = new AuthorizeFilter(new AuthorizationPolicyBuilder().RequireAssertion(c => c.Resource is AuthorizationFilterContext).Build());
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTests.cs (2)
2307Assert.NotNull(context.Resource); 2308var resource = Assert.IsType<HubInvocationContext>(context.Resource);
StaticFilesAuth (2)
Startup.cs (2)
45if (context.Resource is HttpContext httpContext && httpContext.GetEndpoint() is Endpoint endpoint) 61throw new InvalidOperationException($"Unknown resource type '{context.Resource.GetType()}'");