Skip to content

Commit 8cfaa96

Browse files
committed
refactor: 移动模拟登录服务
1 parent 4c4dc29 commit 8cfaa96

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/BootstrapBlazor.Server/Extensions/ServiceCollectionExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public static IServiceCollection AddBootstrapBlazorServerService(this IServiceCo
3434
// 增加 SignalR 服务数据传输大小限制配置
3535
services.Configure<HubOptions>(option => option.MaximumReceiveMessageSize = null);
3636

37+
// 增加授权服务
38+
services.AddAuthorization();
39+
3740
// 增加后台任务服务
3841
services.AddTaskServices();
3942
services.AddHostedService<ClearTempFilesService>();

src/BootstrapBlazor.Shared/Extensions/ServicesCollectionExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ public static IServiceCollection AddWebSiteServices(this IServiceCollection serv
144144
services.AddOptionsMonitor<WebsiteOptions>();
145145

146146
// 增加模拟登录服务
147-
services.AddAuthorization();
148147
services.AddCascadingAuthenticationState();
149148
services.AddScoped<AuthenticationStateProvider, MockAuthenticationStateProvider>();
150149

0 commit comments

Comments
 (0)