Added automatic token refresh feature and login page

This commit is contained in:
2024-07-14 21:25:36 +02:00
parent a164a3d282
commit 7cd412b168
16 changed files with 164 additions and 25 deletions

View File

@@ -1,12 +1,10 @@
using FrontendTest;
using FrontendTest.Components;
using HopFrame.Security.Authentication;
using HopFrame.Web;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<DatabaseContext>();
builder.Services.AddHopFrameAuthentication<DatabaseContext>();
builder.Services.AddHopFrameServices<DatabaseContext>();
// Add services to the container.
@@ -27,6 +25,8 @@ app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAntiforgery();
app.UseAuthorization();
app.UseAuthentication();
app.UseMiddleware<AuthMiddleware>();
app.MapRazorComponents<App>()
.AddHopFramePages()