aggiunta autenticazione windows

This commit is contained in:
zaccaria.majid
2023-07-28 08:22:22 +02:00
parent fb2f83603a
commit 3063d3bdef
3 changed files with 14 additions and 0 deletions
+1
View File
@@ -13,6 +13,7 @@
<ItemGroup>
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2307.2515" />
<PackageReference Include="MailKit" Version="4.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.20" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.13">
+12
View File
@@ -5,9 +5,18 @@ using Microsoft.EntityFrameworkCore;
using SMGen.Data;
using SMGen.Data.Controllers;
using SMGen.Data.Services;
using Microsoft.AspNetCore.Authentication.Negotiate;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
.AddNegotiate();
builder.Services.AddAuthorization(options =>
{
// By default, all incoming requests will be authorized according to the default policy.
options.FallbackPolicy = options.DefaultPolicy;
});
// Add services to the container.
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
@@ -28,6 +37,9 @@ app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");
+1
View File
@@ -26,6 +26,7 @@
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2307.2515" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2307.2515" />
<PackageReference Include="MailKit" Version="4.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.20" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.13">