Table of Contents

Namespace KadicAuth.Infrastructure.Services

Classes

JwtTokenGenerator
NotificationsAuthHandler

Agrega Authorization: Bearer {token} si NotificationsAuthToken está configurado.

NotificationsClient
PasswordHasher
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.Authentication would have to reference KadicAuth.Application to see IPlatformAdminService, which creates a dependency cycle (KadicAuth.Application → KadicErp.Core.Authentication → KadicAuth.Application). This lives in KadicAuth.Infrastructure which 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.

PlatformAdminService
UserSessionValidator