Skip to content

Commit 8ce2ba7

Browse files
committed
Update test app to do Auth
1 parent d166b3a commit 8ce2ba7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/SignalR/server/SignalR/test/Startup.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
using System.Security.Claims;
54
using Microsoft.AspNetCore.Authentication.Cookies;
65
using Microsoft.AspNetCore.Builder;
7-
using Microsoft.AspNetCore.Hosting;
8-
using Microsoft.AspNetCore.Routing;
96
using Microsoft.Extensions.DependencyInjection;
107

118
namespace Microsoft.AspNetCore.SignalR.Tests
@@ -25,11 +22,16 @@ public void ConfigureServices(IServiceCollection services)
2522
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
2623
options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
2724
}).AddCookie();
25+
26+
services.AddAuthorizationPolicyEvaluator();
2827
}
2928

3029
public void Configure(IApplicationBuilder app)
3130
{
3231
app.UseRouting();
32+
app.UseAuthentication();
33+
app.UseAuthorization();
34+
3335
app.UseEndpoints(endpoints =>
3436
{
3537
endpoints.MapHub<UncreatableHub>("/uncreatable");

0 commit comments

Comments
 (0)