35 references to GetHttpContext
Microsoft.AspNetCore.Authorization.Test (35)
AuthorizationMiddlewareTests.cs (35)
33var context = GetHttpContext(anonymous: true); 53var context = GetHttpContext(anonymous: true); 72var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint()); 93var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint()); 115var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new AuthorizeAttribute()), authenticationService: authenticationService); 136var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new AuthorizeAttribute()), authenticationService: authenticationService); 158var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute() { AuthenticationSchemes = "whatever" }), authenticationService: authenticationService); 180var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new AuthorizeAttribute()), authenticationService: authenticationService); 205var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new AuthorizeAttribute("whatever"))); 255var context = GetHttpContext(anonymous: true, endpoint: endpoint); 305var context = GetHttpContext(anonymous: true, endpoint: endpoint); 365var context = GetHttpContext(anonymous: true, endpoint: endpoint); 399var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new AuthorizeAttribute("whatever"))); 433var context = GetHttpContext(anonymous: false, endpoint: CreateEndpoint(new AuthorizeAttribute(), policy)); 471var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new ReqAttribute(req))); 493var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new ReqAttribute(req, req2))); 513var context = GetHttpContext(anonymous: false, endpoint: CreateEndpoint(new AuthorizeAttribute(), new ReqAttribute(req))); 535var context = GetHttpContext(anonymous: anonymous, endpoint: CreateEndpoint(new ReqAuthorizeAttribute(req))); 553var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute())); 573var context = GetHttpContext(anonymous: true, endpoint: CreateEndpoint(new AuthorizeAttribute(), new AllowAnonymousAttribute()), authenticationService: authenticationService); 594var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute()), authenticationService: authenticationService); 616var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute()), authenticationService: authenticationService); 638var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute())); 663var context = GetHttpContext(endpoint: endpoint); 692var context = GetHttpContext(endpoint: endpoint); 712var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute()), authenticationService: authenticationService); 734var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute()), authenticationService: authenticationService); 757var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute()), authenticationService: authenticationService); 778var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute())); 802var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute(), new AllowAnonymousAttribute()), authenticationService: authenticationService); 842var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute()), authenticationService: authenticationService.Object); 865var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute())); 891var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute())); 930var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute()), authenticationService: authenticationService.Object); 956var context = GetHttpContext(endpoint: CreateEndpoint(new AuthorizeAttribute()));