-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathStartup.cs
More file actions
25 lines (23 loc) · 832 Bytes
/
Startup.cs
File metadata and controls
25 lines (23 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using AuthenticationWithClientSideBlazor.Client.Services;
using Blazored.LocalStorage;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace AuthenticationWithClientSideBlazor.Client
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddBlazoredLocalStorage();
services.AddAuthorizationCore();
services.AddScoped<AuthenticationStateProvider, ApiAuthenticationStateProvider>();
services.AddScoped<IAuthService, AuthService>();
}
public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent<App>("app");
}
}
}