Auth System
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
using Blazorise;
|
||||
using Blazorise.Icons.Material;
|
||||
using Blazorise.Material;
|
||||
using FoodsharingSiegen.Server.Auth;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using FoodsharingSiegen.Server.Data.Service;
|
||||
using FoodsharingSiegen.Server.Service;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
@@ -15,7 +18,11 @@ builder.Services.AddDbContextFactory<FsContext>(opt =>
|
||||
opt.UseSqlite($"Data Source=app.db"));
|
||||
|
||||
// DI
|
||||
builder.Services.AddScoped<LocalStorageService>();
|
||||
builder.Services.AddScoped<AuthenticationStateProvider, TokenAuthStateProvider>();
|
||||
|
||||
builder.Services.AddScoped<FsContext>();
|
||||
builder.Services.AddScoped<AuthService>();
|
||||
builder.Services.AddScoped<UserService>();
|
||||
builder.Services.AddScoped<ProspectService>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user