* Fixed issue with not authorizing user
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
{
|
||||
MenuItems = new List<MenuItem>
|
||||
{
|
||||
new() { Text = "Zamówienia DELFOR", Url = "/", IconCss = "fa-solid fa-landmark" },
|
||||
new() { Text = "Zamówienia DELFOR", Url = "/ScheduleOrders", IconCss = "fa-solid fa-landmark" },
|
||||
new() { Text = "Zamówienia klienta EDI", Url = "/EdiCustomerOrders", IconCss = "fa-solid fa-list-check" },
|
||||
new() { Text = "Zamówienia klienta", Url = "/CustomerOrders", IconCss = "fa-solid fa-database" }
|
||||
};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/ScheduleOrder/{ScheduleOrderId:int}"
|
||||
|
||||
@rendermode InteractiveServer
|
||||
@attribute [Authorize]
|
||||
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Syncfusion.Blazor.Grids
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
@page "/"
|
||||
@page "/ScheduleOrders"
|
||||
|
||||
@attribute [Authorize]
|
||||
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using Microsoft.IdentityModel.Tokens
|
||||
@using OrdersManagement.Components.Pages.Shared
|
||||
@using Syncfusion.Blazor.Grids
|
||||
|
||||
@inject ScheduleOrderService ScheduleOrderService
|
||||
@inject AuthenticationStateProvider AuthStateProvider
|
||||
@* //@inject AuthTokenHandler TokenHandler *@
|
||||
|
||||
<div class="h-100 d-flex flex-column">
|
||||
<h5>Zamówienia DELFOR</h5>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@using OrdersManagement.Components.Layout
|
||||
<Router AppAssembly="@typeof(Program).Assembly">
|
||||
<Router AppAssembly="@typeof(Program).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" />
|
||||
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
||||
|
||||
@@ -27,7 +27,8 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
||||
ValidateIssuerSigningKey = true,
|
||||
ValidIssuer = builder.Configuration["Jwt:Issuer"],
|
||||
ValidAudience = builder.Configuration["Jwt:Audience"],
|
||||
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(builder.Configuration["Jwt:Key"]))
|
||||
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(builder.Configuration["Jwt:Key"] ?? string.Empty)),
|
||||
NameClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user