diff --git a/PostFundManagement.Api/Endpoints/Communications/GetApplicantInviteEndpoint.cs b/PostFundManagement.Api/Endpoints/Communications/GetApplicantInviteEndpoint.cs
index 549ab46..469030c 100644
--- a/PostFundManagement.Api/Endpoints/Communications/GetApplicantInviteEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Communications/GetApplicantInviteEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Communications;
diff --git a/PostFundManagement.Api/Endpoints/Communications/GetApplicantInvitesEndpoint.cs b/PostFundManagement.Api/Endpoints/Communications/GetApplicantInvitesEndpoint.cs
index 2bc28b8..62ff7be 100644
--- a/PostFundManagement.Api/Endpoints/Communications/GetApplicantInvitesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Communications/GetApplicantInvitesEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Communications;
diff --git a/PostFundManagement.Api/Endpoints/Communications/GetInvitesEndpoint.cs b/PostFundManagement.Api/Endpoints/Communications/GetInvitesEndpoint.cs
index 879ba57..c4932e6 100644
--- a/PostFundManagement.Api/Endpoints/Communications/GetInvitesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Communications/GetInvitesEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using static PostFundManagement.Application.Extensions.General;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
diff --git a/PostFundManagement.Api/Endpoints/Communications/GetNotificationsEndpoint.cs b/PostFundManagement.Api/Endpoints/Communications/GetNotificationsEndpoint.cs
index 79b67b3..80e2d30 100644
--- a/PostFundManagement.Api/Endpoints/Communications/GetNotificationsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Communications/GetNotificationsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using static PostFundManagement.Application.Extensions.General;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
@@ -15,7 +14,7 @@ public sealed class GetNotificationsEndpoint : IEndpoint
{
public void Map(IEndpointRouteBuilder builder)
{
- builder.MapGet("api/communications/norifications/{organisationId}", async (string organisationId,
+ builder.MapGet("api/communications/notifications/{organisationId}", async (string organisationId,
ICommunicationsService service, CancellationToken cancellationToken = default) =>
await service.GetNotificationsAsync(organisationId, cancellationToken) switch
{
diff --git a/PostFundManagement.Api/Endpoints/Communications/SendInviteEndpoint.cs b/PostFundManagement.Api/Endpoints/Communications/SendInviteEndpoint.cs
index 371adc4..79c606a 100644
--- a/PostFundManagement.Api/Endpoints/Communications/SendInviteEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Communications/SendInviteEndpoint.cs
@@ -5,7 +5,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Communications;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/CreateEvidenceEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/CreateEvidenceEndpoint.cs
index b3fe459..62e123d 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/CreateEvidenceEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/CreateEvidenceEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/CreateIndicatorEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/CreateIndicatorEndpoint.cs
index 5642f0d..f4caad6 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/CreateIndicatorEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/CreateIndicatorEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Evidence;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/CreateMilestoneEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/CreateMilestoneEndpoint.cs
index 5472827..eea7d47 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/CreateMilestoneEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/CreateMilestoneEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Evidence;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceEndpoint.cs
index 1e50d5f..0222ef2 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceFilesEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceFilesEndpoint.cs
index 821b7dc..0624477 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceFilesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceFilesEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceUrlEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceUrlEndpoint.cs
index 77ed22c..3c910d5 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceUrlEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/GetEvidenceUrlEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/GetIndicatorEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/GetIndicatorEndpoint.cs
index 619a167..d36afa5 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/GetIndicatorEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/GetIndicatorEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/GetIndicatorsEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/GetIndicatorsEndpoint.cs
index cfcd9b1..e4b500a 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/GetIndicatorsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/GetIndicatorsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/GetMilestoneEvidenceEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/GetMilestoneEvidenceEndpoint.cs
index 8dd325c..f65efb8 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/GetMilestoneEvidenceEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/GetMilestoneEvidenceEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/GetProjectEvidenceEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/GetProjectEvidenceEndpoint.cs
index e7b9970..c39e9ec 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/GetProjectEvidenceEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/GetProjectEvidenceEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/RecordIndicatorAmountEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/RecordIndicatorAmountEndpoint.cs
index 8ab6040..3c617ac 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/RecordIndicatorAmountEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/RecordIndicatorAmountEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Evidence/UpdateEvidenceEndpoint.cs b/PostFundManagement.Api/Endpoints/Evidence/UpdateEvidenceEndpoint.cs
index 3a5d310..4db42ba 100644
--- a/PostFundManagement.Api/Endpoints/Evidence/UpdateEvidenceEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Evidence/UpdateEvidenceEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Evidence;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Evidence;
diff --git a/PostFundManagement.Api/Endpoints/Execution/ApproveDisbursementEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/ApproveDisbursementEndpoint.cs
index 0cb1f0e..3424687 100644
--- a/PostFundManagement.Api/Endpoints/Execution/ApproveDisbursementEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/ApproveDisbursementEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/CreateDisbursementEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/CreateDisbursementEndpoint.cs
index 7905d82..cbc225d 100644
--- a/PostFundManagement.Api/Endpoints/Execution/CreateDisbursementEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/CreateDisbursementEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Execution;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/CreateRiskEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/CreateRiskEndpoint.cs
index 48e3bce..f9418c4 100644
--- a/PostFundManagement.Api/Endpoints/Execution/CreateRiskEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/CreateRiskEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Execution;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/CreateRuleEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/CreateRuleEndpoint.cs
index dabde01..6a093b7 100644
--- a/PostFundManagement.Api/Endpoints/Execution/CreateRuleEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/CreateRuleEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Execution;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/GetDisbursementEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/GetDisbursementEndpoint.cs
index 827ab0f..95118d4 100644
--- a/PostFundManagement.Api/Endpoints/Execution/GetDisbursementEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/GetDisbursementEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/GetDisbursementsEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/GetDisbursementsEndpoint.cs
index 55f5adb..b498ec2 100644
--- a/PostFundManagement.Api/Endpoints/Execution/GetDisbursementsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/GetDisbursementsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/GetRiskEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/GetRiskEndpoint.cs
index 5478fde..9d78329 100644
--- a/PostFundManagement.Api/Endpoints/Execution/GetRiskEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/GetRiskEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/GetRisksEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/GetRisksEndpoint.cs
index 969a12e..ecd2fb6 100644
--- a/PostFundManagement.Api/Endpoints/Execution/GetRisksEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/GetRisksEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/GetRuleEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/GetRuleEndpoint.cs
index f0bca27..11ecc5e 100644
--- a/PostFundManagement.Api/Endpoints/Execution/GetRuleEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/GetRuleEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/GetRulesEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/GetRulesEndpoint.cs
index b3a1a50..1ca8f40 100644
--- a/PostFundManagement.Api/Endpoints/Execution/GetRulesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/GetRulesEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/UpdateDisbursementEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/UpdateDisbursementEndpoint.cs
index 14bc36e..8ecb1ae 100644
--- a/PostFundManagement.Api/Endpoints/Execution/UpdateDisbursementEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/UpdateDisbursementEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Execution;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/UpdateRiskEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/UpdateRiskEndpoint.cs
index 6d55a7f..b0d0f70 100644
--- a/PostFundManagement.Api/Endpoints/Execution/UpdateRiskEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/UpdateRiskEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Execution;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Execution/UpdateRuleEndpoint.cs b/PostFundManagement.Api/Endpoints/Execution/UpdateRuleEndpoint.cs
index 8a8f864..ff8f53a 100644
--- a/PostFundManagement.Api/Endpoints/Execution/UpdateRuleEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Execution/UpdateRuleEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Execution;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Execution;
diff --git a/PostFundManagement.Api/Endpoints/Governance/CreateInstrumentEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/CreateInstrumentEndpoint.cs
index 886a543..80a6073 100644
--- a/PostFundManagement.Api/Endpoints/Governance/CreateInstrumentEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/CreateInstrumentEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Governance;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/CreateOrganisationEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/CreateOrganisationEndpoint.cs
index 091e28b..334bde9 100644
--- a/PostFundManagement.Api/Endpoints/Governance/CreateOrganisationEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/CreateOrganisationEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Governance;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/CreatePortfolioEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/CreatePortfolioEndpoint.cs
index 1405690..8c38558 100644
--- a/PostFundManagement.Api/Endpoints/Governance/CreatePortfolioEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/CreatePortfolioEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Governance;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/CreateTenantEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/CreateTenantEndpoint.cs
index 572928e..6f0fffa 100644
--- a/PostFundManagement.Api/Endpoints/Governance/CreateTenantEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/CreateTenantEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Governance;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/DashboardEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/DashboardEndpoint.cs
index 0cd7ffe..572f11e 100644
--- a/PostFundManagement.Api/Endpoints/Governance/DashboardEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/DashboardEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Application.Services.Governance;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetAuditLogsEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetAuditLogsEndpoint.cs
index 3421316..7f086d0 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetAuditLogsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetAuditLogsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetInstrumentsEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetInstrumentsEndpoint.cs
index 937bf4a..83db06a 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetInstrumentsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetInstrumentsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetOrganisationEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetOrganisationEndpoint.cs
index 3c12110..96f841b 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetOrganisationEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetOrganisationEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetOrganisationPortfoliosEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetOrganisationPortfoliosEndpoint.cs
index a2071a0..496a984 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetOrganisationPortfoliosEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetOrganisationPortfoliosEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetOrganisationsEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetOrganisationsEndpoint.cs
index a1eb72b..3f08d06 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetOrganisationsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetOrganisationsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetPorfolioValueEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetPorfolioValueEndpoint.cs
index b690f19..82d22ae 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetPorfolioValueEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetPorfolioValueEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetPortfolioEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetPortfolioEndpoint.cs
index 9119acc..8229e24 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetPortfolioEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetPortfolioEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetPortfolioProgrammesEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetPortfolioProgrammesEndpoint.cs
index b6825e8..b2f5f56 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetPortfolioProgrammesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetPortfolioProgrammesEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetPortfoliosEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetPortfoliosEndpoint.cs
index dd8b94e..311ec87 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetPortfoliosEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetPortfoliosEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetProgrammeValueEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetProgrammeValueEndpoint.cs
index 142614f..fc3de4f 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetProgrammeValueEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetProgrammeValueEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetProgrammesEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetProgrammesEndpoint.cs
index 83efaaa..aabc0f5 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetProgrammesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetProgrammesEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetTenantEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetTenantEndpoint.cs
index 4a8b71b..850aeeb 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetTenantEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetTenantEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetTenantOrganisationsEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetTenantOrganisationsEndpoint.cs
index f1251aa..0d22bcf 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetTenantOrganisationsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetTenantOrganisationsEndpoint.cs
@@ -4,8 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Entities;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
-using StackExchange.Redis;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/GetTenantsEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/GetTenantsEndpoint.cs
index 865a037..e4f954c 100644
--- a/PostFundManagement.Api/Endpoints/Governance/GetTenantsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/GetTenantsEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Entities;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/UpdateInstrumentEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/UpdateInstrumentEndpoint.cs
index ecbc6ef..292b542 100644
--- a/PostFundManagement.Api/Endpoints/Governance/UpdateInstrumentEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/UpdateInstrumentEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Governance;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/UpdateOrganisationEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/UpdateOrganisationEndpoint.cs
index 085beac..c493bc9 100644
--- a/PostFundManagement.Api/Endpoints/Governance/UpdateOrganisationEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/UpdateOrganisationEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Governance;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/UpdatePortfolioEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/UpdatePortfolioEndpoint.cs
index 9a0d5c7..d8cc5d9 100644
--- a/PostFundManagement.Api/Endpoints/Governance/UpdatePortfolioEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/UpdatePortfolioEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Governance;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Governance/UpdateTenantEndpoint.cs b/PostFundManagement.Api/Endpoints/Governance/UpdateTenantEndpoint.cs
index 949522f..ca065eb 100644
--- a/PostFundManagement.Api/Endpoints/Governance/UpdateTenantEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Governance/UpdateTenantEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Governance;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Governance;
diff --git a/PostFundManagement.Api/Endpoints/Grants/CreateAwardEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/CreateAwardEndpoint.cs
index edf4f19..7e2ee74 100644
--- a/PostFundManagement.Api/Endpoints/Grants/CreateAwardEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/CreateAwardEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Grants;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/CreateBudgetEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/CreateBudgetEndpoint.cs
index 471615e..6e104e1 100644
--- a/PostFundManagement.Api/Endpoints/Grants/CreateBudgetEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/CreateBudgetEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Grants;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/CreateContractEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/CreateContractEndpoint.cs
index cc59bbb..8d2b2b6 100644
--- a/PostFundManagement.Api/Endpoints/Grants/CreateContractEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/CreateContractEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Grants;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/ExecuteContractEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/ExecuteContractEndpoint.cs
index fa6ac70..a57a7bd 100644
--- a/PostFundManagement.Api/Endpoints/Grants/ExecuteContractEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/ExecuteContractEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Grants;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/GetAwardEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/GetAwardEndpoint.cs
index 3ae4908..76162ca 100644
--- a/PostFundManagement.Api/Endpoints/Grants/GetAwardEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/GetAwardEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/GetAwardsEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/GetAwardsEndpoint.cs
index d35efd6..393b8ee 100644
--- a/PostFundManagement.Api/Endpoints/Grants/GetAwardsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/GetAwardsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/GetBudgetEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/GetBudgetEndpoint.cs
index 70389c7..c7f0696 100644
--- a/PostFundManagement.Api/Endpoints/Grants/GetBudgetEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/GetBudgetEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/GetBudgetsEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/GetBudgetsEndpoint.cs
index 7109591..30b84d5 100644
--- a/PostFundManagement.Api/Endpoints/Grants/GetBudgetsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/GetBudgetsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/GetContractEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/GetContractEndpoint.cs
index 669fd02..46ea9b1 100644
--- a/PostFundManagement.Api/Endpoints/Grants/GetContractEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/GetContractEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/GetContractUrlEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/GetContractUrlEndpoint.cs
index 093fd57..efa6aab 100644
--- a/PostFundManagement.Api/Endpoints/Grants/GetContractUrlEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/GetContractUrlEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/GetContractsEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/GetContractsEndpoint.cs
index eace687..4595a7f 100644
--- a/PostFundManagement.Api/Endpoints/Grants/GetContractsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/GetContractsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/UpdateBudgetEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/UpdateBudgetEndpoint.cs
index 0c171e4..5bea5a6 100644
--- a/PostFundManagement.Api/Endpoints/Grants/UpdateBudgetEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/UpdateBudgetEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Grants;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/UpdateContractEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/UpdateContractEndpoint.cs
index c3a8a76..e2bc190 100644
--- a/PostFundManagement.Api/Endpoints/Grants/UpdateContractEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/UpdateContractEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Grants;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Grants/UploadContractEndpoint.cs b/PostFundManagement.Api/Endpoints/Grants/UploadContractEndpoint.cs
index 7438d24..0d6ec67 100644
--- a/PostFundManagement.Api/Endpoints/Grants/UploadContractEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Grants/UploadContractEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Grants;
diff --git a/PostFundManagement.Api/Endpoints/Projects/CreateActivityEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/CreateActivityEndpoint.cs
index 9398d6a..30f7b2f 100644
--- a/PostFundManagement.Api/Endpoints/Projects/CreateActivityEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/CreateActivityEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/CreateBeneficiaryEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/CreateBeneficiaryEndpoint.cs
index 0787805..51312b2 100644
--- a/PostFundManagement.Api/Endpoints/Projects/CreateBeneficiaryEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/CreateBeneficiaryEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/CreateChangeRequestEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/CreateChangeRequestEndpoint.cs
index f78ca4c..1cf7e7f 100644
--- a/PostFundManagement.Api/Endpoints/Projects/CreateChangeRequestEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/CreateChangeRequestEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/CreateComplianceItemEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/CreateComplianceItemEndpoint.cs
index 85397c2..921972d 100644
--- a/PostFundManagement.Api/Endpoints/Projects/CreateComplianceItemEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/CreateComplianceItemEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/CreateIssueEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/CreateIssueEndpoint.cs
index 2eb631b..ffc1f99 100644
--- a/PostFundManagement.Api/Endpoints/Projects/CreateIssueEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/CreateIssueEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/CreateOutcomeEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/CreateOutcomeEndpoint.cs
index e410127..ded7561 100644
--- a/PostFundManagement.Api/Endpoints/Projects/CreateOutcomeEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/CreateOutcomeEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/CreateProgrammeEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/CreateProgrammeEndpoint.cs
index f9ab7db..af1119f 100644
--- a/PostFundManagement.Api/Endpoints/Projects/CreateProgrammeEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/CreateProgrammeEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/CreateProjectEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/CreateProjectEndpoint.cs
index 9864a47..9c9d352 100644
--- a/PostFundManagement.Api/Endpoints/Projects/CreateProjectEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/CreateProjectEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/CreateSiteVisitEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/CreateSiteVisitEndpoint.cs
index 5de8bde..0be71f6 100644
--- a/PostFundManagement.Api/Endpoints/Projects/CreateSiteVisitEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/CreateSiteVisitEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetActivitiesEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetActivitiesEndpoint.cs
index 4568568..7fa0c10 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetActivitiesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetActivitiesEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetActivityEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetActivityEndpoint.cs
index 507fafb..2cd9be9 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetActivityEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetActivityEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetBeneficiariesEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetBeneficiariesEndpoint.cs
index 5a47e75..f8a86fc 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetBeneficiariesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetBeneficiariesEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetBeneficiaryEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetBeneficiaryEndpoint.cs
index 64cfb49..1cae920 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetBeneficiaryEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetBeneficiaryEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetChangeRequestEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetChangeRequestEndpoint.cs
index 813ca12..071cbad 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetChangeRequestEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetChangeRequestEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetChangeRequestsEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetChangeRequestsEndpoint.cs
index 2520126..1a192cc 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetChangeRequestsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetChangeRequestsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetComplianceItemEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetComplianceItemEndpoint.cs
index 8668edb..b910f67 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetComplianceItemEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetComplianceItemEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetComplianceItemsEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetComplianceItemsEndpoint.cs
index b69ccfb..08fef13 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetComplianceItemsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetComplianceItemsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetIssueEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetIssueEndpoint.cs
index 0207627..b2882cd 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetIssueEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetIssueEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetIssuesEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetIssuesEndpoint.cs
index d88f4ff..35db03a 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetIssuesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetIssuesEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetMilestoneEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetMilestoneEndpoint.cs
index 81c7172..c4573bc 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetMilestoneEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetMilestoneEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetMilestonesEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetMilestonesEndpoint.cs
index 4bea5ca..62efa73 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetMilestonesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetMilestonesEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetOutcomeEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetOutcomeEndpoint.cs
index 644898e..44b84ce 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetOutcomeEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetOutcomeEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetOutcomesEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetOutcomesEndpoint.cs
index 4aa007f..96e5c96 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetOutcomesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetOutcomesEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetProgrammeEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetProgrammeEndpoint.cs
index 6d4448e..2084381 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetProgrammeEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetProgrammeEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetProgrammeProjectsEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetProgrammeProjectsEndpoint.cs
index d15d26e..3cd77ca 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetProgrammeProjectsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetProgrammeProjectsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetProgrammesEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetProgrammesEndpoint.cs
index c33782b..dab6d2a 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetProgrammesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetProgrammesEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetProjectEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetProjectEndpoint.cs
index 209c1f6..17b8d4b 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetProjectEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetProjectEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetProjectIndicatorsEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetProjectIndicatorsEndpoint.cs
index cb992a1..a36b877 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetProjectIndicatorsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetProjectIndicatorsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetProjectMilestonesEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetProjectMilestonesEndpoint.cs
index b5221d9..26e5567 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetProjectMilestonesEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetProjectMilestonesEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetProjectRisksEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetProjectRisksEndpoint.cs
index 334a24e..2ebea23 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetProjectRisksEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetProjectRisksEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetProjectsEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetProjectsEndpoint.cs
index 107a85c..fd3aff8 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetProjectsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetProjectsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetSiteVisitEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetSiteVisitEndpoint.cs
index a0c17f2..a9d224f 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetSiteVisitEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetSiteVisitEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/GetSiteVisitsEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/GetSiteVisitsEndpoint.cs
index 4347e80..8259aac 100644
--- a/PostFundManagement.Api/Endpoints/Projects/GetSiteVisitsEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/GetSiteVisitsEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/UpdateBeneficiaryEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/UpdateBeneficiaryEndpoint.cs
index 255b45b..580fd3e 100644
--- a/PostFundManagement.Api/Endpoints/Projects/UpdateBeneficiaryEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/UpdateBeneficiaryEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/UpdateChangeRequestEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/UpdateChangeRequestEndpoint.cs
index 3368070..d9eecea 100644
--- a/PostFundManagement.Api/Endpoints/Projects/UpdateChangeRequestEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/UpdateChangeRequestEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/UpdateComplianceItemEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/UpdateComplianceItemEndpoint.cs
index 34ed912..134af82 100644
--- a/PostFundManagement.Api/Endpoints/Projects/UpdateComplianceItemEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/UpdateComplianceItemEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/UpdateIssueEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/UpdateIssueEndpoint.cs
index aeae4ac..2a2033f 100644
--- a/PostFundManagement.Api/Endpoints/Projects/UpdateIssueEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/UpdateIssueEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/UpdateMilestoneEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/UpdateMilestoneEndpoint.cs
index 2cc6730..7ef1ebb 100644
--- a/PostFundManagement.Api/Endpoints/Projects/UpdateMilestoneEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/UpdateMilestoneEndpoint.cs
@@ -3,7 +3,6 @@ using PostFundManagement.Application.Extensions;
using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/UpdateOutcomeEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/UpdateOutcomeEndpoint.cs
index 4caf386..de8a0dd 100644
--- a/PostFundManagement.Api/Endpoints/Projects/UpdateOutcomeEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/UpdateOutcomeEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/UpdateProgrammeEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/UpdateProgrammeEndpoint.cs
index 6ae5cda..f1497dc 100644
--- a/PostFundManagement.Api/Endpoints/Projects/UpdateProgrammeEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/UpdateProgrammeEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/UpdateProjectEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/UpdateProjectEndpoint.cs
index 29f2fdd..0c9d6aa 100644
--- a/PostFundManagement.Api/Endpoints/Projects/UpdateProjectEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/UpdateProjectEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/UpdateProjectStatusEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/UpdateProjectStatusEndpoint.cs
index 773ae29..dc08e86 100644
--- a/PostFundManagement.Api/Endpoints/Projects/UpdateProjectStatusEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/UpdateProjectStatusEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Projects/UpdateSiteVisitEndpoint.cs b/PostFundManagement.Api/Endpoints/Projects/UpdateSiteVisitEndpoint.cs
index 917a206..3513f13 100644
--- a/PostFundManagement.Api/Endpoints/Projects/UpdateSiteVisitEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Projects/UpdateSiteVisitEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Application.Services.Projects;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Projects;
diff --git a/PostFundManagement.Api/Endpoints/Users/GetUserEndpoint.cs b/PostFundManagement.Api/Endpoints/Users/GetUserEndpoint.cs
index a40122e..a32ee3c 100644
--- a/PostFundManagement.Api/Endpoints/Users/GetUserEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Users/GetUserEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Users;
diff --git a/PostFundManagement.Api/Endpoints/Users/GetUsersEndpoint.cs b/PostFundManagement.Api/Endpoints/Users/GetUsersEndpoint.cs
index 0ca58cc..a3b4915 100644
--- a/PostFundManagement.Api/Endpoints/Users/GetUsersEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Users/GetUsersEndpoint.cs
@@ -5,7 +5,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Extensions;
using PostFundManagement.Domain.Models;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Users;
diff --git a/PostFundManagement.Api/Endpoints/Users/SyncUserEndpoint.cs b/PostFundManagement.Api/Endpoints/Users/SyncUserEndpoint.cs
index 4801955..6fee673 100644
--- a/PostFundManagement.Api/Endpoints/Users/SyncUserEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Users/SyncUserEndpoint.cs
@@ -1,10 +1,8 @@
using PostFundManagement.Application.Abstractions.Services;
using PostFundManagement.Application.Extensions;
-using PostFundManagement.Application.Services.Communications.Events;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Users;
diff --git a/PostFundManagement.Api/Endpoints/Users/UpdateUserStatusEndpoint.cs b/PostFundManagement.Api/Endpoints/Users/UpdateUserStatusEndpoint.cs
index a1cdddd..3c48131 100644
--- a/PostFundManagement.Api/Endpoints/Users/UpdateUserStatusEndpoint.cs
+++ b/PostFundManagement.Api/Endpoints/Users/UpdateUserStatusEndpoint.cs
@@ -4,7 +4,6 @@ using PostFundManagement.Domain;
using PostFundManagement.Domain.Abstractions;
using PostFundManagement.Domain.Errors;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security;
using Problems = Microsoft.AspNetCore.Mvc.ProblemDetails;
namespace PostFundManagement.Api.Endpoints.Users;
diff --git a/PostFundManagement.Api/PostFundManagement.Api.csproj b/PostFundManagement.Api/PostFundManagement.Api.csproj
index 69d27a8..b1f4f21 100644
--- a/PostFundManagement.Api/PostFundManagement.Api.csproj
+++ b/PostFundManagement.Api/PostFundManagement.Api.csproj
@@ -28,6 +28,7 @@
+
@@ -89,6 +90,7 @@
+
diff --git a/PostFundManagement.Api/Program.cs b/PostFundManagement.Api/Program.cs
index c031e4e..6bbab29 100644
--- a/PostFundManagement.Api/Program.cs
+++ b/PostFundManagement.Api/Program.cs
@@ -1,4 +1,3 @@
-using Microsoft.FeatureManagement;
using PostFundManagement.Application.Extensions;
using PostFundManagement.Application.Filters;
using PostFundManagement.Domain.Abstractions;
@@ -41,6 +40,7 @@ builder.Services.AddEndpointAndServiceCaching(builder.Configuration);
builder.Services.AddMediator();
builder.Services.AddSecurityApiSdk(builder.Configuration);
builder.Services.AddApiSecurity(builder.Configuration);
+builder.Services.AddSkorubaApiService(builder.Configuration);
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(TelemetryPipelineBehavior<,>));
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingPipelineBehavior<,>));
diff --git a/PostFundManagement.Api/appsettings.json b/PostFundManagement.Api/appsettings.json
index b201569..58a2660 100644
--- a/PostFundManagement.Api/appsettings.json
+++ b/PostFundManagement.Api/appsettings.json
@@ -1,5 +1,5 @@
{
- "EnableServiceCaching": true,
+ "EnableServiceCaching": true,
"CorsOrigins": [
"https://console.ifri.khongisa.co.za",
"https://localhost:7208"
@@ -18,6 +18,10 @@
"Authority": "https://sts.security.khongisa.co.za",
"Audience": "pfm-api-dev"
},
+ "MachineIdentitySettings": {
+ "Authority": "https://sts.security.khongisa.co.za",
+ "Scope": "skoruba_identity_admin_api"
+ },
"Logging": {
"LogLevel": {
"Default": "Warning",
diff --git a/PostFundManagement.Application/Abstractions/S3ServiceBase.cs b/PostFundManagement.Application/Abstractions/Services/S3ServiceBase.cs
similarity index 98%
rename from PostFundManagement.Application/Abstractions/S3ServiceBase.cs
rename to PostFundManagement.Application/Abstractions/Services/S3ServiceBase.cs
index d700573..e47b964 100644
--- a/PostFundManagement.Application/Abstractions/S3ServiceBase.cs
+++ b/PostFundManagement.Application/Abstractions/Services/S3ServiceBase.cs
@@ -1,7 +1,7 @@
using PostFundManagement.Application.Services.Shared;
using PostFundManagement.Domain.Errors;
-namespace PostFundManagement.Application.Abstractions;
+namespace PostFundManagement.Application.Abstractions.Services;
public abstract class S3ServiceBase(IAmazonS3 amazonS3)
{
diff --git a/PostFundManagement.Application/Abstractions/ServiceCacheBase.cs b/PostFundManagement.Application/Abstractions/Services/ServiceCacheBase.cs
similarity index 74%
rename from PostFundManagement.Application/Abstractions/ServiceCacheBase.cs
rename to PostFundManagement.Application/Abstractions/Services/ServiceCacheBase.cs
index 7130cf4..41dbb11 100644
--- a/PostFundManagement.Application/Abstractions/ServiceCacheBase.cs
+++ b/PostFundManagement.Application/Abstractions/Services/ServiceCacheBase.cs
@@ -1,4 +1,4 @@
-namespace PostFundManagement.Application.Abstractions;
+namespace PostFundManagement.Application.Abstractions.Services;
public abstract class ServiceCacheBase
{
diff --git a/PostFundManagement.Application/Extensions/Api.cs b/PostFundManagement.Application/Extensions/Api.cs
index 4617f93..552d8ad 100644
--- a/PostFundManagement.Application/Extensions/Api.cs
+++ b/PostFundManagement.Application/Extensions/Api.cs
@@ -1,6 +1,7 @@
using PostFundManagement.Domain.Abstractions;
-using PostFundManagement.Domain.Security;
-using PostFundManagement.Domain.Security.Configuration;
+using PostFundManagement.Domain.Attributes;
+using PostFundManagement.Domain.Configuration.Security;
+using PostFundManagement.Infrastructure.Security;
namespace PostFundManagement.Application.Extensions;
diff --git a/PostFundManagement.Application/Extensions/Security.cs b/PostFundManagement.Application/Extensions/Security.cs
index 43dec7e..5e6545a 100644
--- a/PostFundManagement.Application/Extensions/Security.cs
+++ b/PostFundManagement.Application/Extensions/Security.cs
@@ -1,13 +1,53 @@
+using PostFundManagement.Application.Interceptors;
using PostFundManagement.Application.Services.Shared;
-using PostFundManagement.Domain.Security.Configuration;
+using PostFundManagement.Domain.Abstractions;
+using PostFundManagement.Domain.Configuration.Security;
using PostFundManagement.Domain.Extensions;
-using PostFundManagement.Domain.Security.Sdk;
using PostFundManagement.Infrastructure.Database;
+using PostFundManagement.Infrastructure.Security;
+using static PostFundManagement.Domain.Extensions.Constants;
namespace PostFundManagement.Application.Extensions;
public static class Security
{
+ public static IServiceCollection AddSkorubaApiService(this IServiceCollection services, IConfiguration configuration)
+ {
+ var configSection = configuration.GetSection(nameof(MachineIdentitySettings));
+
+ var authOptions = new MachineIdentitySettings();
+ configSection.Bind(authOptions);
+
+ services.Configure(configSection);
+
+ if (string.IsNullOrWhiteSpace(authOptions.Authority))
+ return services;
+
+ if (!authOptions.Authority.EndsWith('/')) authOptions.Authority += "/";
+
+ services.AddClientCredentialsTokenManagement()
+ .AddClient(SkorubaCredentialClient, client =>
+ {
+ client.TokenEndpoint = new Uri($"{authOptions.Authority}connect/token");
+ client.ClientId = ClientId.Parse(authOptions.ClientId!);
+ client.ClientSecret = ClientSecret.Parse(authOptions.ClientSecret!);
+ client.Scope = Duende.AccessTokenManagement.Scope.ParseOrDefault(authOptions.Scope);
+ });
+
+ services.AddHttpClient(SkorubaHttpClient, client =>
+ {
+ client.BaseAddress = new Uri(configuration.GetConnectionString("SkorubaApi")!);
+ }).AddClientCredentialsTokenHandler(ClientCredentialsClientName.Parse(SkorubaCredentialClient));
+
+ services.AddScoped();
+ services.AddScoped();
+ services.AddSingleton();
+
+ services.AddLoggedAuditedServiceScoped();
+
+ return services;
+ }
+
public static IServiceCollection AddSecurityApiSdk(this IServiceCollection services, IConfiguration configuration)
{
var configSection = configuration.GetSection(nameof(SecurityClientSettings));
diff --git a/PostFundManagement.Application/Extensions/ServiceExtensionTools.cs b/PostFundManagement.Application/Extensions/ServiceExtensionTools.cs
new file mode 100644
index 0000000..e6079f8
--- /dev/null
+++ b/PostFundManagement.Application/Extensions/ServiceExtensionTools.cs
@@ -0,0 +1,78 @@
+using PostFundManagement.Application.Interceptors;
+
+namespace PostFundManagement.Application.Extensions;
+
+public static class ServiceExtensionTools
+{
+ public static IServiceCollection AddLoggedCachedServiceScoped(this IServiceCollection services)
+ where TInterface : class
+ where TImplementation : class, TInterface
+ where TCacheDecorator : class, TInterface
+ {
+ services.AddScoped();
+ services.AddScoped();
+
+ services.AddScoped(provider =>
+ {
+ var proxyGenerator = provider.GetRequiredService();
+ var loggingInterceptor = provider.GetRequiredService();
+
+ var actual = provider.GetRequiredService();
+
+ var cached = ActivatorUtilities.CreateInstance(provider, actual);
+
+ return proxyGenerator.CreateInterfaceProxyWithTarget(cached,
+ loggingInterceptor.ToInterceptor());
+ });
+
+ return services;
+ }
+
+ public static IServiceCollection AddLoggedAuditedCachedServiceScoped(this IServiceCollection services)
+ where TInterface : class
+ where TImplementation : class, TInterface
+ where TCacheDecorator : class, TInterface
+ {
+ services.AddScoped();
+ services.AddScoped();
+
+ services.AddScoped(provider =>
+ {
+ var proxyGenerator = provider.GetRequiredService();
+ var auditInterceptor = provider.GetRequiredService();
+ var loggingInterceptor = provider.GetRequiredService();
+
+ var actual = provider.GetRequiredService();
+
+ var cached = ActivatorUtilities.CreateInstance(provider, actual);
+
+ return proxyGenerator.CreateInterfaceProxyWithTarget(cached,
+ loggingInterceptor.ToInterceptor(),
+ auditInterceptor.ToInterceptor());
+ });
+
+ return services;
+ }
+
+ public static IServiceCollection AddLoggedAuditedServiceScoped(this IServiceCollection services)
+ where TInterface : class
+ where TImplementation : class, TInterface
+ {
+ services.AddScoped();
+
+ services.AddScoped(provider =>
+ {
+ var proxyGenerator = provider.GetRequiredService();
+ var auditInterceptor = provider.GetRequiredService();
+ var loggingInterceptor = provider.GetRequiredService();
+
+ var actual = provider.GetRequiredService();
+
+ return proxyGenerator.CreateInterfaceProxyWithTarget(actual,
+ loggingInterceptor.ToInterceptor(),
+ auditInterceptor.ToInterceptor());
+ });
+
+ return services;
+ }
+}
diff --git a/PostFundManagement.Application/Extensions/Services.cs b/PostFundManagement.Application/Extensions/Services.cs
index 300f634..b1e5a05 100644
--- a/PostFundManagement.Application/Extensions/Services.cs
+++ b/PostFundManagement.Application/Extensions/Services.cs
@@ -15,56 +15,6 @@ namespace PostFundManagement.Application.Extensions;
public static class Services
{
- public static IServiceCollection AddLoggedCachedServiceScoped(this IServiceCollection services)
- where TInterface : class
- where TImplementation : class, TInterface
- where TCacheDecorator : class, TInterface
- {
- services.AddScoped();
- services.AddScoped();
-
- services.AddScoped(sp =>
- {
- var proxyGenerator = sp.GetRequiredService();
- var loggingInterceptor = sp.GetRequiredService();
-
- var actual = sp.GetRequiredService();
-
- var cached = ActivatorUtilities.CreateInstance(sp, actual);
-
- return proxyGenerator.CreateInterfaceProxyWithTarget(cached,
- loggingInterceptor.ToInterceptor());
- });
-
- return services;
- }
-
- public static IServiceCollection AddLoggedAuditedCachedServiceScoped(this IServiceCollection services)
- where TInterface : class
- where TImplementation : class, TInterface
- where TCacheDecorator : class, TInterface
- {
- services.AddScoped();
- services.AddScoped();
-
- services.AddScoped(sp =>
- {
- var proxyGenerator = sp.GetRequiredService();
- var auditInterceptor = sp.GetRequiredService();
- var loggingInterceptor = sp.GetRequiredService();
-
- var actual = sp.GetRequiredService();
-
- var cached = ActivatorUtilities.CreateInstance(sp, actual);
-
- return proxyGenerator.CreateInterfaceProxyWithTarget(cached,
- loggingInterceptor.ToInterceptor(),
- auditInterceptor.ToInterceptor());
- });
-
- return services;
- }
-
public static IServiceCollection AddRegisterServicesWithCaching(this IServiceCollection services, IConfiguration configuration)
{
services.AddScoped();
diff --git a/PostFundManagement.Application/PostFundManagement.Application.csproj b/PostFundManagement.Application/PostFundManagement.Application.csproj
index cb7e900..44bdc83 100644
--- a/PostFundManagement.Application/PostFundManagement.Application.csproj
+++ b/PostFundManagement.Application/PostFundManagement.Application.csproj
@@ -25,6 +25,8 @@
+
+
@@ -37,6 +39,8 @@
+
+
diff --git a/PostFundManagement.Application/Services/Communications/CommunicationsCacheService.cs b/PostFundManagement.Application/Services/Communications/CommunicationsCacheService.cs
index 613677d..ced8a19 100644
--- a/PostFundManagement.Application/Services/Communications/CommunicationsCacheService.cs
+++ b/PostFundManagement.Application/Services/Communications/CommunicationsCacheService.cs
@@ -1,5 +1,4 @@
-using PostFundManagement.Application.Abstractions;
-using PostFundManagement.Application.Abstractions.Services;
+using PostFundManagement.Application.Abstractions.Services;
using PostFundManagement.Application.Extensions;
using PostFundManagement.Application.Services.Shared;
using PostFundManagement.Domain;
diff --git a/PostFundManagement.Application/Services/Evidence/EvidenceCacheService.cs b/PostFundManagement.Application/Services/Evidence/EvidenceCacheService.cs
index be3787b..91f386d 100644
--- a/PostFundManagement.Application/Services/Evidence/EvidenceCacheService.cs
+++ b/PostFundManagement.Application/Services/Evidence/EvidenceCacheService.cs
@@ -1,5 +1,4 @@
-using PostFundManagement.Application.Abstractions;
-using PostFundManagement.Application.Abstractions.Services;
+using PostFundManagement.Application.Abstractions.Services;
using PostFundManagement.Application.Extensions;
using PostFundManagement.Application.Services.Shared;
using PostFundManagement.Domain;
diff --git a/PostFundManagement.Application/Services/Execution/ExecutionCacheService.cs b/PostFundManagement.Application/Services/Execution/ExecutionCacheService.cs
index 8f488ce..032afef 100644
--- a/PostFundManagement.Application/Services/Execution/ExecutionCacheService.cs
+++ b/PostFundManagement.Application/Services/Execution/ExecutionCacheService.cs
@@ -1,5 +1,4 @@
-using PostFundManagement.Application.Abstractions;
-using PostFundManagement.Application.Abstractions.Services;
+using PostFundManagement.Application.Abstractions.Services;
using PostFundManagement.Application.Extensions;
using PostFundManagement.Application.Services.Shared;
using PostFundManagement.Domain;
diff --git a/PostFundManagement.Application/Services/Governance/GovernanceCacheService.cs b/PostFundManagement.Application/Services/Governance/GovernanceCacheService.cs
index f23dcda..030fcc7 100644
--- a/PostFundManagement.Application/Services/Governance/GovernanceCacheService.cs
+++ b/PostFundManagement.Application/Services/Governance/GovernanceCacheService.cs
@@ -1,5 +1,4 @@
-using PostFundManagement.Application.Abstractions;
-using PostFundManagement.Application.Abstractions.Services;
+using PostFundManagement.Application.Abstractions.Services;
using PostFundManagement.Application.Extensions;
using PostFundManagement.Application.Services.Shared;
using PostFundManagement.Domain;
diff --git a/PostFundManagement.Application/Services/Grants/GrantsCacheService.cs b/PostFundManagement.Application/Services/Grants/GrantsCacheService.cs
index cbc56f4..e8c3bb1 100644
--- a/PostFundManagement.Application/Services/Grants/GrantsCacheService.cs
+++ b/PostFundManagement.Application/Services/Grants/GrantsCacheService.cs
@@ -1,5 +1,4 @@
-using PostFundManagement.Application.Abstractions;
-using PostFundManagement.Application.Abstractions.Services;
+using PostFundManagement.Application.Abstractions.Services;
using PostFundManagement.Application.Extensions;
using PostFundManagement.Application.Services.Shared;
using PostFundManagement.Domain;
diff --git a/PostFundManagement.Application/Services/Projects/ProjectCacheService.cs b/PostFundManagement.Application/Services/Projects/ProjectCacheService.cs
index 9e0e3ed..392f91b 100644
--- a/PostFundManagement.Application/Services/Projects/ProjectCacheService.cs
+++ b/PostFundManagement.Application/Services/Projects/ProjectCacheService.cs
@@ -1,5 +1,4 @@
-using PostFundManagement.Application.Abstractions;
-using PostFundManagement.Application.Abstractions.Services;
+using PostFundManagement.Application.Abstractions.Services;
using PostFundManagement.Application.Extensions;
using PostFundManagement.Application.Services.Shared;
using PostFundManagement.Domain;
diff --git a/PostFundManagement.Application/Services/Shared/GeneralS3Service.cs b/PostFundManagement.Application/Services/Shared/GeneralS3Service.cs
index db9a23f..7aede7c 100644
--- a/PostFundManagement.Application/Services/Shared/GeneralS3Service.cs
+++ b/PostFundManagement.Application/Services/Shared/GeneralS3Service.cs
@@ -1,4 +1,4 @@
-using PostFundManagement.Application.Abstractions;
+using PostFundManagement.Application.Abstractions.Services;
using PostFundManagement.Domain.Abstractions;
using static PostFundManagement.Domain.Extensions.Constants;
diff --git a/PostFundManagement.Application/Services/Shared/IdentityCacheService.cs b/PostFundManagement.Application/Services/Shared/IdentityCacheService.cs
index 5a92865..8af5dfd 100644
--- a/PostFundManagement.Application/Services/Shared/IdentityCacheService.cs
+++ b/PostFundManagement.Application/Services/Shared/IdentityCacheService.cs
@@ -1,5 +1,4 @@
-using PostFundManagement.Application.Abstractions;
-using PostFundManagement.Application.Abstractions.Services;
+using PostFundManagement.Application.Abstractions.Services;
namespace PostFundManagement.Application.Services.Shared;
diff --git a/PostFundManagement.Application/Services/Shared/IdentityService.cs b/PostFundManagement.Application/Services/Shared/IdentityService.cs
index 7c668ad..076a3b9 100644
--- a/PostFundManagement.Application/Services/Shared/IdentityService.cs
+++ b/PostFundManagement.Application/Services/Shared/IdentityService.cs
@@ -12,9 +12,10 @@ public sealed class IdentityService(IDbContextFactory cont
{
await using var context = await contextFactory.CreateDbContextAsync(cancellationToken);
- // TODO: Ensure TenantUser status is checked
- var userExistsAndActive = await context.Users
- .AnyAsync(u => u.Id == userId && u.Status == ActivityStatus.Active, cancellationToken);
+ var userExistsAndActive = await context.TenantUsers
+ .Include(i => i.User)
+ .AnyAsync(u => u.UserId == userId && u.Status == ActivityStatus.Active &&
+ u.User!.Status == ActivityStatus.Active, cancellationToken);
return Result.OkIf(userExistsAndActive, NotFoundError.Create());
}));
diff --git a/PostFundManagement.Application/Services/Shared/TokenService.cs b/PostFundManagement.Application/Services/Shared/TokenService.cs
index aab6d3c..cbdb524 100644
--- a/PostFundManagement.Application/Services/Shared/TokenService.cs
+++ b/PostFundManagement.Application/Services/Shared/TokenService.cs
@@ -1,7 +1,7 @@
+using PostFundManagement.Domain.Configuration.Security;
using PostFundManagement.Domain.Errors;
-using PostFundManagement.Domain.Security.Configuration;
-using PostFundManagement.Domain.Security.Models;
-using PostFundManagement.Domain.Security.Sdk;
+using PostFundManagement.Domain.Models.Security;
+using PostFundManagement.Infrastructure.Security;
namespace PostFundManagement.Application.Services.Shared;
@@ -9,10 +9,10 @@ public sealed class TokenService(ISecurityConnectApi connectApi, IOptions> GenerateAsync(CancellationToken cancellationToken = default) =>
- await Result.Try((Func>>)(async () =>
+ public async Task> GenerateAsync(CancellationToken cancellationToken = default) =>
+ await Result.Try((Func>>)(async () =>
{
- using var response = await connectApi.GetToken(new Domain.Security.Models.TokenRequest
+ using var response = await connectApi.GetToken(new Domain.Models.Security.TokenRequest
{
ClientId = clientSettings.ClientId,
ClientSecret = clientSettings.ClientSecret,
@@ -27,14 +27,14 @@ public sealed class TokenService(ISecurityConnectApi connectApi, IOptions(contentRaw);
+ var tokenResponse = JsonSerializer.Deserialize(contentRaw);
return Result.FailIf(string.IsNullOrWhiteSpace(tokenResponse?.AccessToken),
NotFoundError.Create("Authentication succeeded, but no access token was found in the response payload."))
.ToResult(tokenResponse!);
}
- return await Result.Try((Func>>)(async () =>
+ return await Result.Try((Func>>)(async () =>
{
var errorResult = JsonSerializer.Deserialize(contentRaw);
diff --git a/PostFundManagement.Application/Services/Users/UserCacheService.cs b/PostFundManagement.Application/Services/Users/UserCacheService.cs
index 4a703de..9c25c7b 100644
--- a/PostFundManagement.Application/Services/Users/UserCacheService.cs
+++ b/PostFundManagement.Application/Services/Users/UserCacheService.cs
@@ -1,5 +1,4 @@
-using PostFundManagement.Application.Abstractions;
-using PostFundManagement.Application.Abstractions.Services;
+using PostFundManagement.Application.Abstractions.Services;
using PostFundManagement.Application.Extensions;
using PostFundManagement.Application.Services.Shared;
using PostFundManagement.Domain;
diff --git a/PostFundManagement.Domain/Abstractions/ISkorubaUserService.cs b/PostFundManagement.Domain/Abstractions/ISkorubaUserService.cs
new file mode 100644
index 0000000..b4aff97
--- /dev/null
+++ b/PostFundManagement.Domain/Abstractions/ISkorubaUserService.cs
@@ -0,0 +1,30 @@
+using PostFundManagement.Domain.Attributes;
+using PostFundManagement.Domain.Models.Security;
+
+namespace PostFundManagement.Domain.Abstractions;
+
+public interface ISkorubaUserService
+{
+ [Log]
+ [Audit]
+ Task> CreateUserAsync(CreateUserRequest request, CancellationToken cancellationToken = default);
+
+ [Log]
+ Task> GetUserAsync(string userId, CancellationToken cancellationToken = default);
+
+ [Log]
+ [Audit]
+ Task UpdateUserAsync(UpdateUserRequest request, CancellationToken cancellationToken = default);
+
+ [Log]
+ [Audit]
+ Task SetUserLockoutAsync(string userId, bool disabled, CancellationToken cancellationToken = default);
+
+ [Log]
+ [Audit]
+ Task AddClaimAsync(string userId, string claimType, string claimValue, CancellationToken cancellationToken = default);
+
+ [Log]
+ [Audit]
+ Task RemoveClaimAsync(string userId, int claimId, CancellationToken cancellationToken = default);
+}
diff --git a/PostFundManagement.Domain/Security/ApiVersionTargetAttribute.cs b/PostFundManagement.Domain/Attributes/ApiVersionTargetAttribute.cs
similarity index 80%
rename from PostFundManagement.Domain/Security/ApiVersionTargetAttribute.cs
rename to PostFundManagement.Domain/Attributes/ApiVersionTargetAttribute.cs
index 1fde059..66836b2 100644
--- a/PostFundManagement.Domain/Security/ApiVersionTargetAttribute.cs
+++ b/PostFundManagement.Domain/Attributes/ApiVersionTargetAttribute.cs
@@ -1,4 +1,4 @@
-namespace PostFundManagement.Domain.Security;
+namespace PostFundManagement.Domain.Attributes;
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class ApiVersionTargetAttribute(int majorVersion) : Attribute
diff --git a/PostFundManagement.Domain/Configuration/Security/MachineIdentitySettings.cs b/PostFundManagement.Domain/Configuration/Security/MachineIdentitySettings.cs
new file mode 100644
index 0000000..a917b66
--- /dev/null
+++ b/PostFundManagement.Domain/Configuration/Security/MachineIdentitySettings.cs
@@ -0,0 +1,12 @@
+namespace PostFundManagement.Domain.Configuration.Security;
+
+public sealed class MachineIdentitySettings
+{
+ public string? Authority { get; set; }
+
+ public string? Scope { get; set; }
+
+ public string? ClientId { get; set; }
+
+ public string? ClientSecret { get; set; }
+}
\ No newline at end of file
diff --git a/PostFundManagement.Domain/Security/Configuration/SecurityClientSettings.cs b/PostFundManagement.Domain/Configuration/Security/SecurityClientSettings.cs
similarity index 81%
rename from PostFundManagement.Domain/Security/Configuration/SecurityClientSettings.cs
rename to PostFundManagement.Domain/Configuration/Security/SecurityClientSettings.cs
index 777389d..0a288eb 100644
--- a/PostFundManagement.Domain/Security/Configuration/SecurityClientSettings.cs
+++ b/PostFundManagement.Domain/Configuration/Security/SecurityClientSettings.cs
@@ -1,4 +1,4 @@
-namespace PostFundManagement.Domain.Security.Configuration;
+namespace PostFundManagement.Domain.Configuration.Security;
public sealed class SecurityClientSettings
{
diff --git a/PostFundManagement.Domain/Security/Configuration/SecuritySettings.cs b/PostFundManagement.Domain/Configuration/Security/SecuritySettings.cs
similarity index 78%
rename from PostFundManagement.Domain/Security/Configuration/SecuritySettings.cs
rename to PostFundManagement.Domain/Configuration/Security/SecuritySettings.cs
index 9ec93e7..dc140d5 100644
--- a/PostFundManagement.Domain/Security/Configuration/SecuritySettings.cs
+++ b/PostFundManagement.Domain/Configuration/Security/SecuritySettings.cs
@@ -1,4 +1,4 @@
-namespace PostFundManagement.Domain.Security.Configuration;
+namespace PostFundManagement.Domain.Configuration.Security;
public sealed class SecuritySettings
{
diff --git a/PostFundManagement.Domain/Extensions/Constants.cs b/PostFundManagement.Domain/Extensions/Constants.cs
index 2dffa2f..1e54edc 100644
--- a/PostFundManagement.Domain/Extensions/Constants.cs
+++ b/PostFundManagement.Domain/Extensions/Constants.cs
@@ -4,38 +4,28 @@ public static class Constants
{
public const string ServiceCachingFeature = "EnableServiceCaching";
+ public const string SkorubaCredentialClient = nameof(SkorubaCredentialClient);
+ public const string SkorubaHttpClient = nameof(SkorubaHttpClient);
public const string MainScope = "ApiScope";
-
public const string CorsPolicy = "AllowConfiguredOrigins";
-
public const string CachePolicy = "DefaultCachePolicy";
public const string EmailtemKey = "UserEmail";
-
public const string UserRoleItemKey = "UserRole";
-
public const string UserIdItemKey = "UserId";
- public const string DefaultSchedulerName = "pfm-scheduler";
-
public const string GeneralS3SettingsSection = "GeneralS3Settings";
-
public const string EvidenceS3SettingsSection = "EvidenceS3Settings";
-
public const string ContractS3SettingsSection = "ContractS3Settings";
-
public const string GeneralBucketName = "pfm";
public const string DatabaseConfigName = "PfmDatabase";
+ public const string DefaultSchedulerName = "pfm-scheduler";
public const string SchedulerDatabaseConfigName = "PfmSchedulerDatabase";
public const int LabelLength = 256;
-
public const int ShortLabelLength = 100;
-
public const int TextLength = 1024;
-
public const int MediumTextLength = 2048;
-
public const int LargeTextLength = 4096;
}
\ No newline at end of file
diff --git a/PostFundManagement.Domain/Models/Security/Contracts.cs b/PostFundManagement.Domain/Models/Security/Contracts.cs
new file mode 100644
index 0000000..e67f680
--- /dev/null
+++ b/PostFundManagement.Domain/Models/Security/Contracts.cs
@@ -0,0 +1,9 @@
+namespace PostFundManagement.Domain.Models.Security;
+
+public sealed record CreateUserRequest(string UserName, string Email, string Password, bool EmailConfirmed = true, string? PhoneNumber = null, bool PhoneNumberConfirmed = false);
+
+public sealed record UpdateUserRequest(string Id, string UserName, string Email, bool EmailConfirmed, string? PhoneNumber, bool PhoneNumberConfirmed, bool LockoutEnabled, DateTimeOffset? LockoutEnd, int AccessFailedCount, bool TwoFactorEnabled);
+
+public sealed record UserClaim(string ClaimType, string ClaimValue, int? ClaimId = null);
+
+public sealed record UserResponse(string Id, string UserName, string Email, bool IsLockedOut, bool LockoutEnabled);
\ No newline at end of file
diff --git a/PostFundManagement.Domain/Security/Models/TokenErrorResponse.cs b/PostFundManagement.Domain/Models/Security/TokenErrorResponse.cs
similarity index 84%
rename from PostFundManagement.Domain/Security/Models/TokenErrorResponse.cs
rename to PostFundManagement.Domain/Models/Security/TokenErrorResponse.cs
index 2ebf9c1..f7326cb 100644
--- a/PostFundManagement.Domain/Security/Models/TokenErrorResponse.cs
+++ b/PostFundManagement.Domain/Models/Security/TokenErrorResponse.cs
@@ -1,4 +1,4 @@
-namespace PostFundManagement.Domain.Security.Models;
+namespace PostFundManagement.Domain.Models.Security;
public sealed class TokenErrorResponse
{
diff --git a/PostFundManagement.Domain/Security/Models/TokenRequest.cs b/PostFundManagement.Domain/Models/Security/TokenRequest.cs
similarity index 89%
rename from PostFundManagement.Domain/Security/Models/TokenRequest.cs
rename to PostFundManagement.Domain/Models/Security/TokenRequest.cs
index 4043bc6..eef495e 100644
--- a/PostFundManagement.Domain/Security/Models/TokenRequest.cs
+++ b/PostFundManagement.Domain/Models/Security/TokenRequest.cs
@@ -1,4 +1,4 @@
-namespace PostFundManagement.Domain.Security.Models;
+namespace PostFundManagement.Domain.Models.Security;
public sealed class TokenRequest
{
diff --git a/PostFundManagement.Domain/Security/Models/TokenResponse.cs b/PostFundManagement.Domain/Models/Security/TokenResponse.cs
similarity index 86%
rename from PostFundManagement.Domain/Security/Models/TokenResponse.cs
rename to PostFundManagement.Domain/Models/Security/TokenResponse.cs
index 420d19f..391b5e2 100644
--- a/PostFundManagement.Domain/Security/Models/TokenResponse.cs
+++ b/PostFundManagement.Domain/Models/Security/TokenResponse.cs
@@ -1,4 +1,4 @@
-namespace PostFundManagement.Domain.Security.Models;
+namespace PostFundManagement.Domain.Models.Security;
public sealed class TokenResponse
{
diff --git a/PostFundManagement.Domain/Security/Configuration/MachineIdentity.cs b/PostFundManagement.Domain/Security/Configuration/MachineIdentity.cs
deleted file mode 100644
index c740234..0000000
--- a/PostFundManagement.Domain/Security/Configuration/MachineIdentity.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace PostFundManagement.Domain.Security.Configuration;
-
-public sealed class MachineIdentity
-{
- public string? Authority { get; set; }
-
- public string? Audience { get; set; }
-
- public string? ClientId { get; set; }
-
- public string? ClientSecret { get; set; }
-}
\ No newline at end of file
diff --git a/PostFundManagement.Domain/Security/Sdk/ISecurityConnectApi.cs b/PostFundManagement.Domain/Security/Sdk/ISecurityConnectApi.cs
deleted file mode 100644
index 080cb4a..0000000
--- a/PostFundManagement.Domain/Security/Sdk/ISecurityConnectApi.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace PostFundManagement.Domain.Security.Sdk;
-
-public interface ISecurityConnectApi
-{
- [Post("/connect/token")]
- ValueTask GetToken([Body(BodySerializationMethod.UrlEncoded)] Models.TokenRequest request, CancellationToken cancellationToken = default);
-}
\ No newline at end of file
diff --git a/PostFundManagement.Infrastructure/PostFundManagement.Infrastructure.csproj b/PostFundManagement.Infrastructure/PostFundManagement.Infrastructure.csproj
index ebbf430..4d741b3 100644
--- a/PostFundManagement.Infrastructure/PostFundManagement.Infrastructure.csproj
+++ b/PostFundManagement.Infrastructure/PostFundManagement.Infrastructure.csproj
@@ -12,6 +12,7 @@
+
@@ -26,6 +27,8 @@
+
+
@@ -37,7 +40,10 @@
+
+
+
diff --git a/PostFundManagement.Infrastructure/Security/ISecurityConnectApi.cs b/PostFundManagement.Infrastructure/Security/ISecurityConnectApi.cs
new file mode 100644
index 0000000..7426bf7
--- /dev/null
+++ b/PostFundManagement.Infrastructure/Security/ISecurityConnectApi.cs
@@ -0,0 +1,9 @@
+using PostFundManagement.Domain.Models.Security;
+
+namespace PostFundManagement.Infrastructure.Security;
+
+public interface ISecurityConnectApi
+{
+ [Post("/connect/token")]
+ ValueTask GetToken([Body(BodySerializationMethod.UrlEncoded)] TokenRequest request, CancellationToken cancellationToken = default);
+}
\ No newline at end of file
diff --git a/PostFundManagement.Domain/Security/OpenApiBearerSecuritySchemeTransformer.cs b/PostFundManagement.Infrastructure/Security/OpenApiBearerSecuritySchemeTransformer.cs
similarity index 90%
rename from PostFundManagement.Domain/Security/OpenApiBearerSecuritySchemeTransformer.cs
rename to PostFundManagement.Infrastructure/Security/OpenApiBearerSecuritySchemeTransformer.cs
index 0c9a853..20c7480 100644
--- a/PostFundManagement.Domain/Security/OpenApiBearerSecuritySchemeTransformer.cs
+++ b/PostFundManagement.Infrastructure/Security/OpenApiBearerSecuritySchemeTransformer.cs
@@ -1,4 +1,4 @@
-namespace PostFundManagement.Domain.Security;
+namespace PostFundManagement.Infrastructure.Security;
public sealed class OpenApiBearerSecuritySchemeTransformer : IOpenApiDocumentTransformer
{
diff --git a/PostFundManagement.Infrastructure/Security/SkorubaUserService.cs b/PostFundManagement.Infrastructure/Security/SkorubaUserService.cs
new file mode 100644
index 0000000..62d393d
--- /dev/null
+++ b/PostFundManagement.Infrastructure/Security/SkorubaUserService.cs
@@ -0,0 +1,82 @@
+using PostFundManagement.Domain.Abstractions;
+using PostFundManagement.Domain.Errors;
+using PostFundManagement.Domain.Models.Security;
+using static PostFundManagement.Domain.Extensions.Constants;
+
+namespace PostFundManagement.Infrastructure.Security;
+
+public class SkorubaUserService([FromKeyedServices(SkorubaHttpClient)] IHttpClientFactory httpClientFactory) : ISkorubaUserService
+{
+ public async Task> CreateUserAsync(CreateUserRequest request, CancellationToken cancellationToken = default) =>
+ await Result.Try((Func>>)(async () =>
+ {
+ var httpClient = httpClientFactory.CreateClient();
+ var response = await httpClient.PostAsJsonAsync("api/users", request, cancellationToken);
+
+ response.EnsureSuccessStatusCode();
+
+ var created = await response.Content.ReadFromJsonAsync(cancellationToken: cancellationToken);
+
+ return Result.FailIf(created is null, CreateError.Create("User ID missing from creation response."))
+ .ToResult(created?.Id!);
+ }));
+
+ public async Task> GetUserAsync(string userId, CancellationToken cancellationToken = default) =>
+ await Result.Try((Func>>)(async () =>
+ {
+ var httpClient = httpClientFactory.CreateClient();
+ var result = await httpClient.GetFromJsonAsync($"api/users/{userId}", cancellationToken);
+
+ return Result.FailIf(result is null, NotFoundError.Create($"User {userId} not found."))
+ .ToResult(result!);
+ }));
+
+ public async Task UpdateUserAsync(UpdateUserRequest request, CancellationToken cancellationToken = default) =>
+ await Result.Try((Func>)(async () =>
+ {
+ var httpClient = httpClientFactory.CreateClient();
+ var response = await httpClient.PutAsJsonAsync("api/users", request, cancellationToken);
+
+ return Result.OkIf(response.IsSuccessStatusCode, UpdateError.Create("Failed to update user."));
+ }));
+
+ public async Task SetUserLockoutAsync(string userId, bool disabled, CancellationToken cancellationToken = default) =>
+ await Result.Try((Func>)(async () =>
+ {
+ var httpClient = httpClientFactory.CreateClient();
+ var user = await httpClient.GetFromJsonAsync($"api/users/{userId}", cancellationToken);
+
+ if(user is null)
+ return Result.Fail(NotFoundError.Create($"User {userId} not found."));
+
+ var updated = user with
+ {
+ LockoutEnabled = true,
+ LockoutEnd = disabled ? DateTimeOffset.UtcNow.AddYears(100) : null
+ };
+
+ var response = await httpClient.PutAsJsonAsync("api/users", updated, cancellationToken);
+
+ return Result.OkIf(response.IsSuccessStatusCode, UpdateError.Create("Failed to update user lockout status."));
+ }));
+
+ public async Task AddClaimAsync(string userId, string claimType, string claimValue, CancellationToken cancellationToken = default) =>
+ await Result.Try((Func>)(async () =>
+ {
+ var httpClient = httpClientFactory.CreateClient();
+ var payload = new { UserId = userId, ClaimType = claimType, ClaimValue = claimValue };
+
+ var response = await httpClient.PostAsJsonAsync($"api/users/{userId}/claims", payload, cancellationToken);
+
+ return Result.OkIf(response.IsSuccessStatusCode, CreateError.Create("Failed to add user claim."));
+ }));
+
+ public async Task RemoveClaimAsync(string userId, int claimId, CancellationToken cancellationToken = default) =>
+ await Result.Try((Func>)(async () =>
+ {
+ var httpClient = httpClientFactory.CreateClient();
+ var response = await httpClient.DeleteAsync($"api/users/{userId}/claims/{claimId}", cancellationToken);
+
+ return Result.OkIf(response.IsSuccessStatusCode, CreateError.Create("Failed to remove user claim."));
+ }));
+}
\ No newline at end of file