private HttpClient CreateClient(ClaimsPrincipal principal, IEnumerable<string> allowedScopes) { var startup = new PrimaryAuthenticationStartup(principal, allowedScopes); var server = TestServer.Create(null, startup.Configure, startup.ConfigureServices); return server.CreateClient(); }
private HttpClient CreateClient(ClaimsPrincipal principal, IEnumerable <string> allowedScopes) { var startup = new PrimaryAuthenticationStartup(principal, allowedScopes); var server = new TestServer(new WebHostBuilder() .Configure(startup.Configure) .ConfigureServices(startup.ConfigureServices)); return(server.CreateClient()); }