Get User Id from Web API

This commit is contained in:
Paul Schneider 2025-02-17 23:56:28 +00:00
commit 9e6a4f7d13
26 changed files with 83 additions and 60 deletions

View file

@ -12,6 +12,7 @@ namespace Yavsc.Controllers
using Models.Billing;
using Models.Workflow;
using ViewModels.Auth;
using Yavsc.Server.Helpers;
[Authorize]
public class EstimateController : Controller

View file

@ -10,6 +10,7 @@ namespace Yavsc.Controllers
using Microsoft.Extensions.Localization;
using Models;
using ViewModels.FrontOffice;
using Yavsc.Server.Helpers;
using Yavsc.Services;
public class FrontOfficeController : Controller

View file

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Yavsc.Helpers;
using Yavsc.Server.Helpers;
namespace Yavsc.Controllers
{

View file

@ -29,6 +29,7 @@ using Yavsc.Models.Workflow;
using Yavsc.Services;
using Yavsc.Settings;
using Yavsc.ViewModels.Auth;
using Yavsc.Server.Helpers;
namespace Yavsc.Extensions;
@ -335,7 +336,6 @@ public static class HostingExtensions
.AddInMemoryIdentityResources(Config.IdentityResources)
.AddInMemoryClients(Config.Clients)
.AddInMemoryApiScopes(Config.ApiScopes)
.AddAspNetIdentity<ApplicationUser>()
.AddProfileService<ProfileService>()
;

View file

@ -0,0 +1,10 @@
using System.Security.Claims;
namespace Yavsc.Helpers
{
public static class UserHelpers
{
}
}

View file

@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
using Yavsc.Helpers;
using Yavsc.Server.Helpers;
using Yavsc.Settings;
namespace Yavsc;

View file

@ -8,6 +8,7 @@ using Yavsc.ViewModels;
using Yavsc.ViewModels.Gen;
using Yavsc.Services;
using Microsoft.EntityFrameworkCore;
using Yavsc.Server.Helpers;
namespace Yavsc.ViewComponents
{

View file

@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Server.Helpers;
using Yavsc.ViewModels.UserFiles;
namespace Yavsc.ViewComponents

View file

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>