Namespace KadicAuth.Infrastructure.Services
Classes
- NotificationsAuthHandler
Agrega Authorization: Bearer {token} si NotificationsAuthToken está configurado.
- PlatformAdminAwarePermissionService
Decorator over the base KadicErp.Core.Abstractions.Authorization.IPermissionService implementation (
KadicErp.Core.Authentication.Services.PermissionService) that short circuits for active platform admins.Why a decorator instead of modifying the base class:
KadicErp.Core.Authenticationwould have to referenceKadicAuth.Applicationto see IPlatformAdminService, which creates a dependency cycle (KadicAuth.Application → KadicErp.Core.Authentication → KadicAuth.Application). This lives inKadicAuth.Infrastructurewhich already references both projects, so we get the behavior we need without touching the core auth services layer.Wire-up: register this as the KadicErp.Core.Abstractions.Authorization.IPermissionService implementation in every API host (KadicAuth.Api, KadicErp.WebApi, KadicErp.Notifications.Api), AND also register the base KadicErp.Core.Authentication.Services.PermissionService so the decorator has a concrete dependency to delegate to. See the DI helper
AddPlatformAdminAwarePermissions()below.