@colveor/core 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +6 -0
- package/dist/bootstrap/bootstrap-colveor-app.d.ts.map +1 -1
- package/dist/bootstrap/bootstrap-colveor-app.js +22 -3
- package/dist/bootstrap/bootstrap-colveor-app.js.map +1 -1
- package/dist/common/decorators/index.d.ts +6 -0
- package/dist/common/decorators/index.d.ts.map +1 -1
- package/dist/common/decorators/index.js +8 -1
- package/dist/common/decorators/index.js.map +1 -1
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.d.ts +9 -0
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.d.ts.map +1 -0
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.js +12 -0
- package/dist/common/decorators/ip-rate-limit-bucket.decorator.js.map +1 -0
- package/dist/common/guards/login-ip-rate-limit.guard.d.ts +12 -6
- package/dist/common/guards/login-ip-rate-limit.guard.d.ts.map +1 -1
- package/dist/common/guards/login-ip-rate-limit.guard.js +65 -21
- package/dist/common/guards/login-ip-rate-limit.guard.js.map +1 -1
- package/dist/common/guards/otp-ip-rate-limit.guard.d.ts +3 -2
- package/dist/common/guards/otp-ip-rate-limit.guard.d.ts.map +1 -1
- package/dist/common/guards/otp-ip-rate-limit.guard.js +17 -15
- package/dist/common/guards/otp-ip-rate-limit.guard.js.map +1 -1
- package/dist/common/guards/permissions.guard.d.ts.map +1 -1
- package/dist/common/guards/permissions.guard.js +12 -2
- package/dist/common/guards/permissions.guard.js.map +1 -1
- package/dist/common/interceptors/timeout.interceptor.d.ts +1 -1
- package/dist/common/interceptors/timeout.interceptor.d.ts.map +1 -1
- package/dist/common/interceptors/timeout.interceptor.js +5 -1
- package/dist/common/interceptors/timeout.interceptor.js.map +1 -1
- package/dist/common/interfaces/request-user.d.ts +4 -3
- package/dist/common/interfaces/request-user.d.ts.map +1 -1
- package/dist/common/utils/cache-version.util.d.ts +12 -0
- package/dist/common/utils/cache-version.util.d.ts.map +1 -0
- package/dist/common/utils/cache-version.util.js +34 -0
- package/dist/common/utils/cache-version.util.js.map +1 -0
- package/dist/common/utils/postgres-error.util.d.ts +5 -0
- package/dist/common/utils/postgres-error.util.d.ts.map +1 -0
- package/dist/common/utils/postgres-error.util.js +13 -0
- package/dist/common/utils/postgres-error.util.js.map +1 -0
- package/dist/common/utils/singleflight.util.d.ts +6 -0
- package/dist/common/utils/singleflight.util.d.ts.map +1 -0
- package/dist/common/utils/singleflight.util.js +21 -0
- package/dist/common/utils/singleflight.util.js.map +1 -0
- package/dist/common/validators/is-exclusive-auth-params.validator.js +1 -1
- package/dist/common/validators/is-exclusive-auth-params.validator.js.map +1 -1
- package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js +1 -1
- package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js.map +1 -1
- package/dist/config/app.config.d.ts +38 -0
- package/dist/config/app.config.d.ts.map +1 -1
- package/dist/config/app.config.js +24 -0
- package/dist/config/app.config.js.map +1 -1
- package/dist/config/database.config.d.ts +6 -0
- package/dist/config/database.config.d.ts.map +1 -1
- package/dist/config/database.config.js +3 -0
- package/dist/config/database.config.js.map +1 -1
- package/dist/config/env-flags.util.d.ts +4 -0
- package/dist/config/env-flags.util.d.ts.map +1 -1
- package/dist/config/env-flags.util.js +7 -0
- package/dist/config/env-flags.util.js.map +1 -1
- package/dist/config/env.validation.d.ts +24 -1
- package/dist/config/env.validation.d.ts.map +1 -1
- package/dist/config/env.validation.js +92 -2
- package/dist/config/env.validation.js.map +1 -1
- package/dist/config/in-memory-redis.client.d.ts +23 -4
- package/dist/config/in-memory-redis.client.d.ts.map +1 -1
- package/dist/config/in-memory-redis.client.js +148 -4
- package/dist/config/in-memory-redis.client.js.map +1 -1
- package/dist/config/redis.module.d.ts.map +1 -1
- package/dist/config/redis.module.js +5 -0
- package/dist/config/redis.module.js.map +1 -1
- package/dist/core.module.d.ts +5 -0
- package/dist/core.module.d.ts.map +1 -1
- package/dist/core.module.js +5 -0
- package/dist/core.module.js.map +1 -1
- package/dist/database/migrations/1785006199371-auth-mfa-oauth.d.ts +7 -0
- package/dist/database/migrations/1785006199371-auth-mfa-oauth.d.ts.map +1 -0
- package/dist/database/migrations/1785006199371-auth-mfa-oauth.js +24 -0
- package/dist/database/migrations/1785006199371-auth-mfa-oauth.js.map +1 -0
- package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.d.ts +7 -0
- package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.d.ts.map +1 -0
- package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.js +16 -0
- package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.js.map +1 -0
- package/dist/database/migrations/1785006199373-auth-gap-fixes.d.ts +7 -0
- package/dist/database/migrations/1785006199373-auth-gap-fixes.d.ts.map +1 -0
- package/dist/database/migrations/1785006199373-auth-gap-fixes.js +14 -0
- package/dist/database/migrations/1785006199373-auth-gap-fixes.js.map +1 -0
- package/dist/database/migrations/1785006199374-auth-sessions-indexes.d.ts +13 -0
- package/dist/database/migrations/1785006199374-auth-sessions-indexes.d.ts.map +1 -0
- package/dist/database/migrations/1785006199374-auth-sessions-indexes.js +35 -0
- package/dist/database/migrations/1785006199374-auth-sessions-indexes.js.map +1 -0
- package/dist/database/migrations/1785006199375-auth-identity-and-audit.d.ts +11 -0
- package/dist/database/migrations/1785006199375-auth-identity-and-audit.d.ts.map +1 -0
- package/dist/database/migrations/1785006199375-auth-identity-and-audit.js +60 -0
- package/dist/database/migrations/1785006199375-auth-identity-and-audit.js.map +1 -0
- package/dist/database/migrations/1785006199376-auth-settings-security-defaults.d.ts +14 -0
- package/dist/database/migrations/1785006199376-auth-settings-security-defaults.d.ts.map +1 -0
- package/dist/database/migrations/1785006199376-auth-settings-security-defaults.js +39 -0
- package/dist/database/migrations/1785006199376-auth-settings-security-defaults.js.map +1 -0
- package/dist/database/migrations/1785006199377-auth-security-hardening.d.ts +13 -0
- package/dist/database/migrations/1785006199377-auth-security-hardening.d.ts.map +1 -0
- package/dist/database/migrations/1785006199377-auth-security-hardening.js +69 -0
- package/dist/database/migrations/1785006199377-auth-security-hardening.js.map +1 -0
- package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.d.ts +11 -0
- package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.d.ts.map +1 -0
- package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.js +51 -0
- package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.js.map +1 -0
- package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.d.ts +12 -0
- package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.d.ts.map +1 -0
- package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.js +37 -0
- package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.js.map +1 -0
- package/dist/database/migrations/1785006199380-auth-remaining-gaps.d.ts +12 -0
- package/dist/database/migrations/1785006199380-auth-remaining-gaps.d.ts.map +1 -0
- package/dist/database/migrations/1785006199380-auth-remaining-gaps.js +74 -0
- package/dist/database/migrations/1785006199380-auth-remaining-gaps.js.map +1 -0
- package/dist/database/migrations/1785006199381-settings-blast-radius.d.ts +12 -0
- package/dist/database/migrations/1785006199381-settings-blast-radius.d.ts.map +1 -0
- package/dist/database/migrations/1785006199381-settings-blast-radius.js +52 -0
- package/dist/database/migrations/1785006199381-settings-blast-radius.js.map +1 -0
- package/dist/database/migrations/1785006199382-oauth-client-ids-lock.d.ts +11 -0
- package/dist/database/migrations/1785006199382-oauth-client-ids-lock.d.ts.map +1 -0
- package/dist/database/migrations/1785006199382-oauth-client-ids-lock.js +36 -0
- package/dist/database/migrations/1785006199382-oauth-client-ids-lock.js.map +1 -0
- package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.d.ts +12 -0
- package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.d.ts.map +1 -0
- package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.js +39 -0
- package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.js.map +1 -0
- package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.d.ts +12 -0
- package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.d.ts.map +1 -0
- package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.js +39 -0
- package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.js.map +1 -0
- package/dist/database/migrations/1785006199385-settings-auth-surface-lock.d.ts +13 -0
- package/dist/database/migrations/1785006199385-settings-auth-surface-lock.d.ts.map +1 -0
- package/dist/database/migrations/1785006199385-settings-auth-surface-lock.js +72 -0
- package/dist/database/migrations/1785006199385-settings-auth-surface-lock.js.map +1 -0
- package/dist/database/migrations/1785006199386-audit-events.d.ts +10 -0
- package/dist/database/migrations/1785006199386-audit-events.d.ts.map +1 -0
- package/dist/database/migrations/1785006199386-audit-events.js +60 -0
- package/dist/database/migrations/1785006199386-audit-events.js.map +1 -0
- package/dist/database/migrations/1785006199387-audit-resource-id-varchar.d.ts +10 -0
- package/dist/database/migrations/1785006199387-audit-resource-id-varchar.d.ts.map +1 -0
- package/dist/database/migrations/1785006199387-audit-resource-id-varchar.js +25 -0
- package/dist/database/migrations/1785006199387-audit-resource-id-varchar.js.map +1 -0
- package/dist/database/migrations/1785006199388-audit-enterprise.d.ts +11 -0
- package/dist/database/migrations/1785006199388-audit-enterprise.d.ts.map +1 -0
- package/dist/database/migrations/1785006199388-audit-enterprise.js +157 -0
- package/dist/database/migrations/1785006199388-audit-enterprise.js.map +1 -0
- package/dist/database/migrations/1785006199389-drop-admin-logs.d.ts +10 -0
- package/dist/database/migrations/1785006199389-drop-admin-logs.d.ts.map +1 -0
- package/dist/database/migrations/1785006199389-drop-admin-logs.js +38 -0
- package/dist/database/migrations/1785006199389-drop-admin-logs.js.map +1 -0
- package/dist/database/migrations/1785006199390-audit-hardening.d.ts +14 -0
- package/dist/database/migrations/1785006199390-audit-hardening.d.ts.map +1 -0
- package/dist/database/migrations/1785006199390-audit-hardening.js +345 -0
- package/dist/database/migrations/1785006199390-audit-hardening.js.map +1 -0
- package/dist/database/migrations/1785006199391-audit-owner-schema-create.d.ts +10 -0
- package/dist/database/migrations/1785006199391-audit-owner-schema-create.d.ts.map +1 -0
- package/dist/database/migrations/1785006199391-audit-owner-schema-create.js +39 -0
- package/dist/database/migrations/1785006199391-audit-owner-schema-create.js.map +1 -0
- package/dist/database/migrations/1785006199392-profile-photo-url.d.ts +11 -0
- package/dist/database/migrations/1785006199392-profile-photo-url.d.ts.map +1 -0
- package/dist/database/migrations/1785006199392-profile-photo-url.js +33 -0
- package/dist/database/migrations/1785006199392-profile-photo-url.js.map +1 -0
- package/dist/database/migrations/1785006199393-profile-cover-url.d.ts +11 -0
- package/dist/database/migrations/1785006199393-profile-cover-url.d.ts.map +1 -0
- package/dist/database/migrations/1785006199393-profile-cover-url.js +33 -0
- package/dist/database/migrations/1785006199393-profile-cover-url.js.map +1 -0
- package/dist/database/migrations/1785006199394-profile-is-public-default-false.d.ts +11 -0
- package/dist/database/migrations/1785006199394-profile-is-public-default-false.d.ts.map +1 -0
- package/dist/database/migrations/1785006199394-profile-is-public-default-false.js +24 -0
- package/dist/database/migrations/1785006199394-profile-is-public-default-false.js.map +1 -0
- package/dist/database/migrations/1785006199395-delivery-scale-indexes.d.ts +10 -0
- package/dist/database/migrations/1785006199395-delivery-scale-indexes.d.ts.map +1 -0
- package/dist/database/migrations/1785006199395-delivery-scale-indexes.js +35 -0
- package/dist/database/migrations/1785006199395-delivery-scale-indexes.js.map +1 -0
- package/dist/database/migrations/1785006199396-delivery-recipient-index.d.ts +11 -0
- package/dist/database/migrations/1785006199396-delivery-recipient-index.d.ts.map +1 -0
- package/dist/database/migrations/1785006199396-delivery-recipient-index.js +23 -0
- package/dist/database/migrations/1785006199396-delivery-recipient-index.js.map +1 -0
- package/dist/database/seeds/roles.seed.d.ts +6 -0
- package/dist/database/seeds/roles.seed.d.ts.map +1 -1
- package/dist/database/seeds/roles.seed.js +22 -5
- package/dist/database/seeds/roles.seed.js.map +1 -1
- package/dist/database/seeds/settings.seed.d.ts +5 -0
- package/dist/database/seeds/settings.seed.d.ts.map +1 -1
- package/dist/database/seeds/settings.seed.js +500 -25
- package/dist/database/seeds/settings.seed.js.map +1 -1
- package/dist/database/seeds/templates/html-template.reader.d.ts +1 -0
- package/dist/database/seeds/templates/html-template.reader.d.ts.map +1 -1
- package/dist/database/seeds/templates/html-template.reader.js +3 -1
- package/dist/database/seeds/templates/html-template.reader.js.map +1 -1
- package/dist/database/seeds/templates/html-template.reader.ts +5 -1
- package/dist/database/typeorm.util.d.ts.map +1 -1
- package/dist/database/typeorm.util.js +6 -0
- package/dist/database/typeorm.util.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -4
- package/dist/index.js.map +1 -1
- package/dist/modules/admin/controllers/admin.controller.d.ts +15 -7
- package/dist/modules/admin/controllers/admin.controller.d.ts.map +1 -1
- package/dist/modules/admin/controllers/admin.controller.js +74 -17
- package/dist/modules/admin/controllers/admin.controller.js.map +1 -1
- package/dist/modules/admin/services/admin-log.service.d.ts +14 -7
- package/dist/modules/admin/services/admin-log.service.d.ts.map +1 -1
- package/dist/modules/admin/services/admin-log.service.js +41 -38
- package/dist/modules/admin/services/admin-log.service.js.map +1 -1
- package/dist/modules/audit/audit.manifest.d.ts +8 -0
- package/dist/modules/audit/audit.manifest.d.ts.map +1 -0
- package/dist/modules/audit/audit.manifest.js +31 -0
- package/dist/modules/audit/audit.manifest.js.map +1 -0
- package/dist/modules/audit/audit.module.d.ts +8 -0
- package/dist/modules/audit/audit.module.d.ts.map +1 -0
- package/dist/modules/audit/audit.module.js +57 -0
- package/dist/modules/audit/audit.module.js.map +1 -0
- package/dist/modules/audit/constants/audit-actions.d.ts +79 -0
- package/dist/modules/audit/constants/audit-actions.d.ts.map +1 -0
- package/dist/modules/audit/constants/audit-actions.js +89 -0
- package/dist/modules/audit/constants/audit-actions.js.map +1 -0
- package/dist/modules/audit/constants/audit-mutation.d.ts +10 -0
- package/dist/modules/audit/constants/audit-mutation.d.ts.map +1 -0
- package/dist/modules/audit/constants/audit-mutation.js +13 -0
- package/dist/modules/audit/constants/audit-mutation.js.map +1 -0
- package/dist/modules/audit/controllers/audit.controller.d.ts +13 -0
- package/dist/modules/audit/controllers/audit.controller.d.ts.map +1 -0
- package/dist/modules/audit/controllers/audit.controller.js +149 -0
- package/dist/modules/audit/controllers/audit.controller.js.map +1 -0
- package/dist/modules/audit/decorators/audit.decorator.d.ts +27 -0
- package/dist/modules/audit/decorators/audit.decorator.d.ts.map +1 -0
- package/dist/modules/audit/decorators/audit.decorator.js +18 -0
- package/dist/modules/audit/decorators/audit.decorator.js.map +1 -0
- package/dist/modules/audit/dto/audit.dto.d.ts +54 -0
- package/dist/modules/audit/dto/audit.dto.d.ts.map +1 -0
- package/dist/modules/audit/dto/audit.dto.js +129 -0
- package/dist/modules/audit/dto/audit.dto.js.map +1 -0
- package/dist/modules/audit/entities/audit-event.entity.d.ts +33 -0
- package/dist/modules/audit/entities/audit-event.entity.d.ts.map +1 -0
- package/dist/modules/audit/entities/audit-event.entity.js +125 -0
- package/dist/modules/audit/entities/audit-event.entity.js.map +1 -0
- package/dist/modules/audit/entities/audit-outbox.entity.d.ts +16 -0
- package/dist/modules/audit/entities/audit-outbox.entity.d.ts.map +1 -0
- package/dist/modules/audit/entities/audit-outbox.entity.js +65 -0
- package/dist/modules/audit/entities/audit-outbox.entity.js.map +1 -0
- package/dist/modules/audit/index.d.ts +13 -0
- package/dist/modules/audit/index.d.ts.map +1 -0
- package/dist/modules/audit/index.js +23 -0
- package/dist/modules/audit/index.js.map +1 -0
- package/dist/modules/audit/interceptors/audit.interceptor.d.ts +11 -0
- package/dist/modules/audit/interceptors/audit.interceptor.d.ts.map +1 -0
- package/dist/modules/audit/interceptors/audit.interceptor.js +75 -0
- package/dist/modules/audit/interceptors/audit.interceptor.js.map +1 -0
- package/dist/modules/audit/listeners/auth-audit.listener.d.ts +31 -0
- package/dist/modules/audit/listeners/auth-audit.listener.d.ts.map +1 -0
- package/dist/modules/audit/listeners/auth-audit.listener.js +338 -0
- package/dist/modules/audit/listeners/auth-audit.listener.js.map +1 -0
- package/dist/modules/audit/services/audit-archive.service.d.ts +28 -0
- package/dist/modules/audit/services/audit-archive.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-archive.service.js +132 -0
- package/dist/modules/audit/services/audit-archive.service.js.map +1 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.d.ts +22 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.js +79 -0
- package/dist/modules/audit/services/audit-hash-backfill.service.js.map +1 -0
- package/dist/modules/audit/services/audit-leader.service.d.ts +28 -0
- package/dist/modules/audit/services/audit-leader.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-leader.service.js +99 -0
- package/dist/modules/audit/services/audit-leader.service.js.map +1 -0
- package/dist/modules/audit/services/audit-outbox.worker.d.ts +29 -0
- package/dist/modules/audit/services/audit-outbox.worker.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-outbox.worker.js +144 -0
- package/dist/modules/audit/services/audit-outbox.worker.js.map +1 -0
- package/dist/modules/audit/services/audit-partition.service.d.ts +18 -0
- package/dist/modules/audit/services/audit-partition.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-partition.service.js +70 -0
- package/dist/modules/audit/services/audit-partition.service.js.map +1 -0
- package/dist/modules/audit/services/audit-write.service.d.ts +60 -0
- package/dist/modules/audit/services/audit-write.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit-write.service.js +463 -0
- package/dist/modules/audit/services/audit-write.service.js.map +1 -0
- package/dist/modules/audit/services/audit.service.d.ts +60 -0
- package/dist/modules/audit/services/audit.service.d.ts.map +1 -0
- package/dist/modules/audit/services/audit.service.js +373 -0
- package/dist/modules/audit/services/audit.service.js.map +1 -0
- package/dist/modules/audit/utils/audit-hash.util.d.ts +20 -0
- package/dist/modules/audit/utils/audit-hash.util.d.ts.map +1 -0
- package/dist/modules/audit/utils/audit-hash.util.js +44 -0
- package/dist/modules/audit/utils/audit-hash.util.js.map +1 -0
- package/dist/modules/auth/auth-core/auth-core.module.d.ts.map +1 -1
- package/dist/modules/auth/auth-core/auth-core.module.js +16 -4
- package/dist/modules/auth/auth-core/auth-core.module.js.map +1 -1
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts +22 -0
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js +25 -0
- package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js.map +1 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.d.ts +19 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.js +110 -0
- package/dist/modules/auth/auth-core/services/access-token.validator.js.map +1 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts +10 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.js +44 -0
- package/dist/modules/auth/auth-core/services/family-denylist.reader.js.map +1 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts +10 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts.map +1 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.js +44 -0
- package/dist/modules/auth/auth-core/services/session-epoch.reader.js.map +1 -0
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts +7 -8
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts.map +1 -1
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.js +34 -34
- package/dist/modules/auth/auth-core/strategies/jwt.strategy.js.map +1 -1
- package/dist/modules/auth/auth.manifest.d.ts +6 -0
- package/dist/modules/auth/auth.manifest.d.ts.map +1 -1
- package/dist/modules/auth/auth.manifest.js +38 -2
- package/dist/modules/auth/auth.manifest.js.map +1 -1
- package/dist/modules/auth/auth.module.d.ts.map +1 -1
- package/dist/modules/auth/auth.module.js +39 -4
- package/dist/modules/auth/auth.module.js.map +1 -1
- package/dist/modules/auth/controllers/account.controller.d.ts +15 -1
- package/dist/modules/auth/controllers/account.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/account.controller.js +65 -7
- package/dist/modules/auth/controllers/account.controller.js.map +1 -1
- package/dist/modules/auth/controllers/auth.controller.d.ts +7 -3
- package/dist/modules/auth/controllers/auth.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/auth.controller.js +76 -16
- package/dist/modules/auth/controllers/auth.controller.js.map +1 -1
- package/dist/modules/auth/controllers/forgot-password.controller.d.ts +4 -2
- package/dist/modules/auth/controllers/forgot-password.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/forgot-password.controller.js +32 -11
- package/dist/modules/auth/controllers/forgot-password.controller.js.map +1 -1
- package/dist/modules/auth/controllers/mfa.controller.d.ts +18 -0
- package/dist/modules/auth/controllers/mfa.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/mfa.controller.js +192 -0
- package/dist/modules/auth/controllers/mfa.controller.js.map +1 -0
- package/dist/modules/auth/controllers/oauth.controller.d.ts +22 -0
- package/dist/modules/auth/controllers/oauth.controller.d.ts.map +1 -0
- package/dist/modules/auth/controllers/oauth.controller.js +192 -0
- package/dist/modules/auth/controllers/oauth.controller.js.map +1 -0
- package/dist/modules/auth/controllers/otp.controller.d.ts +6 -3
- package/dist/modules/auth/controllers/otp.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/otp.controller.js +32 -33
- package/dist/modules/auth/controllers/otp.controller.js.map +1 -1
- package/dist/modules/auth/controllers/pin.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/pin.controller.js +10 -2
- package/dist/modules/auth/controllers/pin.controller.js.map +1 -1
- package/dist/modules/auth/controllers/session.controller.d.ts +12 -4
- package/dist/modules/auth/controllers/session.controller.d.ts.map +1 -1
- package/dist/modules/auth/controllers/session.controller.js +130 -31
- package/dist/modules/auth/controllers/session.controller.js.map +1 -1
- package/dist/modules/auth/dto/auth-config.dto.d.ts +11 -2
- package/dist/modules/auth/dto/auth-config.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/auth-config.dto.js +78 -3
- package/dist/modules/auth/dto/auth-config.dto.js.map +1 -1
- package/dist/modules/auth/dto/index.d.ts +2 -0
- package/dist/modules/auth/dto/index.d.ts.map +1 -1
- package/dist/modules/auth/dto/index.js +2 -0
- package/dist/modules/auth/dto/index.js.map +1 -1
- package/dist/modules/auth/dto/login.dto.d.ts +8 -1
- package/dist/modules/auth/dto/login.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/login.dto.js +48 -3
- package/dist/modules/auth/dto/login.dto.js.map +1 -1
- package/dist/modules/auth/dto/mfa.dto.d.ts +61 -0
- package/dist/modules/auth/dto/mfa.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/mfa.dto.js +326 -0
- package/dist/modules/auth/dto/mfa.dto.js.map +1 -0
- package/dist/modules/auth/dto/oauth.dto.d.ts +45 -0
- package/dist/modules/auth/dto/oauth.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/oauth.dto.js +249 -0
- package/dist/modules/auth/dto/oauth.dto.js.map +1 -0
- package/dist/modules/auth/dto/otp.dto.d.ts +3 -1
- package/dist/modules/auth/dto/otp.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/otp.dto.js +19 -0
- package/dist/modules/auth/dto/otp.dto.js.map +1 -1
- package/dist/modules/auth/dto/password.dto.d.ts +28 -0
- package/dist/modules/auth/dto/password.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/password.dto.js +191 -5
- package/dist/modules/auth/dto/password.dto.js.map +1 -1
- package/dist/modules/auth/dto/register.dto.d.ts +1 -0
- package/dist/modules/auth/dto/register.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/register.dto.js +1 -0
- package/dist/modules/auth/dto/register.dto.js.map +1 -1
- package/dist/modules/auth/dto/session.dto.d.ts +20 -0
- package/dist/modules/auth/dto/session.dto.d.ts.map +1 -0
- package/dist/modules/auth/dto/session.dto.js +98 -0
- package/dist/modules/auth/dto/session.dto.js.map +1 -0
- package/dist/modules/auth/dto/token.dto.d.ts +38 -1
- package/dist/modules/auth/dto/token.dto.d.ts.map +1 -1
- package/dist/modules/auth/dto/token.dto.js +21 -1
- package/dist/modules/auth/dto/token.dto.js.map +1 -1
- package/dist/modules/auth/entities/index.d.ts +2 -0
- package/dist/modules/auth/entities/index.d.ts.map +1 -1
- package/dist/modules/auth/entities/index.js +2 -0
- package/dist/modules/auth/entities/index.js.map +1 -1
- package/dist/modules/auth/entities/password-reset-token.entity.d.ts +2 -0
- package/dist/modules/auth/entities/password-reset-token.entity.d.ts.map +1 -1
- package/dist/modules/auth/entities/password-reset-token.entity.js +6 -0
- package/dist/modules/auth/entities/password-reset-token.entity.js.map +1 -1
- package/dist/modules/auth/entities/user-mfa.entity.d.ts +19 -0
- package/dist/modules/auth/entities/user-mfa.entity.d.ts.map +1 -0
- package/dist/modules/auth/entities/user-mfa.entity.js +73 -0
- package/dist/modules/auth/entities/user-mfa.entity.js.map +1 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts +24 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts.map +1 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.js +84 -0
- package/dist/modules/auth/entities/user-oauth-identity.entity.js.map +1 -0
- package/dist/modules/auth/events/auth.events.d.ts +84 -19
- package/dist/modules/auth/events/auth.events.d.ts.map +1 -1
- package/dist/modules/auth/events/auth.events.js +17 -9
- package/dist/modules/auth/events/auth.events.js.map +1 -1
- package/dist/modules/auth/services/account.service.d.ts +74 -14
- package/dist/modules/auth/services/account.service.d.ts.map +1 -1
- package/dist/modules/auth/services/account.service.js +247 -31
- package/dist/modules/auth/services/account.service.js.map +1 -1
- package/dist/modules/auth/services/dpop.service.d.ts +41 -0
- package/dist/modules/auth/services/dpop.service.d.ts.map +1 -0
- package/dist/modules/auth/services/dpop.service.js +159 -0
- package/dist/modules/auth/services/dpop.service.js.map +1 -0
- package/dist/modules/auth/services/index.d.ts +2 -0
- package/dist/modules/auth/services/index.d.ts.map +1 -1
- package/dist/modules/auth/services/index.js +2 -0
- package/dist/modules/auth/services/index.js.map +1 -1
- package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts +28 -0
- package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts.map +1 -0
- package/dist/modules/auth/services/legacy-hash-cleanup.service.js +163 -0
- package/dist/modules/auth/services/legacy-hash-cleanup.service.js.map +1 -0
- package/dist/modules/auth/services/login.service.d.ts +29 -34
- package/dist/modules/auth/services/login.service.d.ts.map +1 -1
- package/dist/modules/auth/services/login.service.js +173 -61
- package/dist/modules/auth/services/login.service.js.map +1 -1
- package/dist/modules/auth/services/mfa.service.d.ts +111 -0
- package/dist/modules/auth/services/mfa.service.d.ts.map +1 -0
- package/dist/modules/auth/services/mfa.service.js +662 -0
- package/dist/modules/auth/services/mfa.service.js.map +1 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts +11 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.js +56 -0
- package/dist/modules/auth/services/oauth/apple-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts +12 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.js +64 -0
- package/dist/modules/auth/services/oauth/google-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts +11 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js +76 -0
- package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts +16 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js +92 -0
- package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js.map +1 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts +9 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.js +3 -0
- package/dist/modules/auth/services/oauth/verified-oauth-identity.js.map +1 -0
- package/dist/modules/auth/services/oauth.service.d.ts +83 -0
- package/dist/modules/auth/services/oauth.service.d.ts.map +1 -0
- package/dist/modules/auth/services/oauth.service.js +471 -0
- package/dist/modules/auth/services/oauth.service.js.map +1 -0
- package/dist/modules/auth/services/otp-auth.service.d.ts +13 -3
- package/dist/modules/auth/services/otp-auth.service.d.ts.map +1 -1
- package/dist/modules/auth/services/otp-auth.service.js +41 -7
- package/dist/modules/auth/services/otp-auth.service.js.map +1 -1
- package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts +22 -0
- package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts.map +1 -0
- package/dist/modules/auth/services/password-reset-audit-retention.service.js +117 -0
- package/dist/modules/auth/services/password-reset-audit-retention.service.js.map +1 -0
- package/dist/modules/auth/services/password.service.d.ts +25 -5
- package/dist/modules/auth/services/password.service.d.ts.map +1 -1
- package/dist/modules/auth/services/password.service.js +154 -20
- package/dist/modules/auth/services/password.service.js.map +1 -1
- package/dist/modules/auth/services/pin-auth.service.d.ts +10 -3
- package/dist/modules/auth/services/pin-auth.service.d.ts.map +1 -1
- package/dist/modules/auth/services/pin-auth.service.js +110 -13
- package/dist/modules/auth/services/pin-auth.service.js.map +1 -1
- package/dist/modules/auth/services/registration.service.d.ts +10 -2
- package/dist/modules/auth/services/registration.service.d.ts.map +1 -1
- package/dist/modules/auth/services/registration.service.js +113 -25
- package/dist/modules/auth/services/registration.service.js.map +1 -1
- package/dist/modules/auth/services/turnstile.service.d.ts +17 -0
- package/dist/modules/auth/services/turnstile.service.d.ts.map +1 -0
- package/dist/modules/auth/services/turnstile.service.js +94 -0
- package/dist/modules/auth/services/turnstile.service.js.map +1 -0
- package/dist/modules/auth/utils/auth-params.util.d.ts +13 -6
- package/dist/modules/auth/utils/auth-params.util.d.ts.map +1 -1
- package/dist/modules/auth/utils/auth-params.util.js +27 -4
- package/dist/modules/auth/utils/auth-params.util.js.map +1 -1
- package/dist/modules/auth/utils/auth-supported.util.d.ts +12 -1
- package/dist/modules/auth/utils/auth-supported.util.d.ts.map +1 -1
- package/dist/modules/auth/utils/auth-supported.util.js +36 -4
- package/dist/modules/auth/utils/auth-supported.util.js.map +1 -1
- package/dist/modules/auth/utils/backup-code-hash.util.d.ts +10 -0
- package/dist/modules/auth/utils/backup-code-hash.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/backup-code-hash.util.js +31 -0
- package/dist/modules/auth/utils/backup-code-hash.util.js.map +1 -0
- package/dist/modules/auth/utils/backup-codes.util.d.ts +5 -0
- package/dist/modules/auth/utils/backup-codes.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/backup-codes.util.js +22 -0
- package/dist/modules/auth/utils/backup-codes.util.js.map +1 -0
- package/dist/modules/auth/utils/dpop.util.d.ts +22 -0
- package/dist/modules/auth/utils/dpop.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/dpop.util.js +73 -0
- package/dist/modules/auth/utils/dpop.util.js.map +1 -0
- package/dist/modules/auth/utils/mfa-secret.util.d.ts +22 -0
- package/dist/modules/auth/utils/mfa-secret.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/mfa-secret.util.js +59 -0
- package/dist/modules/auth/utils/mfa-secret.util.js.map +1 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.d.ts +26 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.js +49 -0
- package/dist/modules/auth/utils/mfa-verify-params.util.js.map +1 -0
- package/dist/modules/auth/utils/step-up-purpose.util.d.ts +5 -0
- package/dist/modules/auth/utils/step-up-purpose.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/step-up-purpose.util.js +18 -0
- package/dist/modules/auth/utils/step-up-purpose.util.js.map +1 -0
- package/dist/modules/auth/utils/totp.util.d.ts +16 -0
- package/dist/modules/auth/utils/totp.util.d.ts.map +1 -0
- package/dist/modules/auth/utils/totp.util.js +88 -0
- package/dist/modules/auth/utils/totp.util.js.map +1 -0
- package/dist/modules/delivery/composers/otp-delivery.composer.d.ts +28 -1
- package/dist/modules/delivery/composers/otp-delivery.composer.d.ts.map +1 -1
- package/dist/modules/delivery/composers/otp-delivery.composer.js +48 -2
- package/dist/modules/delivery/composers/otp-delivery.composer.js.map +1 -1
- package/dist/modules/delivery/constants/delivery-worker.constants.d.ts +29 -0
- package/dist/modules/delivery/constants/delivery-worker.constants.d.ts.map +1 -0
- package/dist/modules/delivery/constants/delivery-worker.constants.js +51 -0
- package/dist/modules/delivery/constants/delivery-worker.constants.js.map +1 -0
- package/dist/modules/delivery/delivery.module.d.ts.map +1 -1
- package/dist/modules/delivery/delivery.module.js +1 -15
- package/dist/modules/delivery/delivery.module.js.map +1 -1
- package/dist/modules/delivery/entities/notification-delivery-log.entity.d.ts.map +1 -1
- package/dist/modules/delivery/entities/notification-delivery-log.entity.js +3 -1
- package/dist/modules/delivery/entities/notification-delivery-log.entity.js.map +1 -1
- package/dist/modules/delivery/notification-delivery.service.d.ts +12 -1
- package/dist/modules/delivery/notification-delivery.service.d.ts.map +1 -1
- package/dist/modules/delivery/notification-delivery.service.js +121 -40
- package/dist/modules/delivery/notification-delivery.service.js.map +1 -1
- package/dist/modules/delivery/processors/delivery-job.runner.d.ts +22 -1
- package/dist/modules/delivery/processors/delivery-job.runner.d.ts.map +1 -1
- package/dist/modules/delivery/processors/delivery-job.runner.js +144 -42
- package/dist/modules/delivery/processors/delivery-job.runner.js.map +1 -1
- package/dist/modules/delivery/processors/delivery.processor.d.ts.map +1 -1
- package/dist/modules/delivery/processors/delivery.processor.js +6 -1
- package/dist/modules/delivery/processors/delivery.processor.js.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts +11 -0
- package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery-job.runner.js +90 -16
- package/dist/modules/delivery/processors/otp-delivery-job.runner.js.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery.processor.d.ts.map +1 -1
- package/dist/modules/delivery/processors/otp-delivery.processor.js +6 -1
- package/dist/modules/delivery/processors/otp-delivery.processor.js.map +1 -1
- package/dist/modules/delivery/queues/sync-jobs.queue.d.ts +7 -1
- package/dist/modules/delivery/queues/sync-jobs.queue.d.ts.map +1 -1
- package/dist/modules/delivery/queues/sync-jobs.queue.js +11 -2
- package/dist/modules/delivery/queues/sync-jobs.queue.js.map +1 -1
- package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts +7 -3
- package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts.map +1 -1
- package/dist/modules/delivery/services/delivery-audit-retention.service.js +33 -10
- package/dist/modules/delivery/services/delivery-audit-retention.service.js.map +1 -1
- package/dist/modules/delivery/services/notification-audit.service.d.ts +7 -4
- package/dist/modules/delivery/services/notification-audit.service.d.ts.map +1 -1
- package/dist/modules/delivery/services/notification-audit.service.js +83 -26
- package/dist/modules/delivery/services/notification-audit.service.js.map +1 -1
- package/dist/modules/delivery/utils/payload-snapshot.util.d.ts +2 -0
- package/dist/modules/delivery/utils/payload-snapshot.util.d.ts.map +1 -1
- package/dist/modules/delivery/utils/payload-snapshot.util.js +22 -3
- package/dist/modules/delivery/utils/payload-snapshot.util.js.map +1 -1
- package/dist/modules/file-upload/controllers/file-upload.controller.d.ts +7 -1
- package/dist/modules/file-upload/controllers/file-upload.controller.d.ts.map +1 -1
- package/dist/modules/file-upload/controllers/file-upload.controller.js +5 -7
- package/dist/modules/file-upload/controllers/file-upload.controller.js.map +1 -1
- package/dist/modules/file-upload/dto/file-upload.dto.d.ts +2 -0
- package/dist/modules/file-upload/dto/file-upload.dto.d.ts.map +1 -1
- package/dist/modules/file-upload/dto/file-upload.dto.js +20 -0
- package/dist/modules/file-upload/dto/file-upload.dto.js.map +1 -1
- package/dist/modules/file-upload/file-upload.module.d.ts.map +1 -1
- package/dist/modules/file-upload/file-upload.module.js +12 -2
- package/dist/modules/file-upload/file-upload.module.js.map +1 -1
- package/dist/modules/file-upload/services/file-upload.service.d.ts +24 -6
- package/dist/modules/file-upload/services/file-upload.service.d.ts.map +1 -1
- package/dist/modules/file-upload/services/file-upload.service.js +164 -36
- package/dist/modules/file-upload/services/file-upload.service.js.map +1 -1
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts +4 -2
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts.map +1 -1
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js +30 -5
- package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js.map +1 -1
- package/dist/modules/file-upload/utils/image-optimize.util.d.ts.map +1 -1
- package/dist/modules/file-upload/utils/image-optimize.util.js +7 -1
- package/dist/modules/file-upload/utils/image-optimize.util.js.map +1 -1
- package/dist/modules/health/health.controller.d.ts +5 -1
- package/dist/modules/health/health.controller.d.ts.map +1 -1
- package/dist/modules/health/health.controller.js +57 -3
- package/dist/modules/health/health.controller.js.map +1 -1
- package/dist/modules/invitations/controllers/invitations.controller.d.ts +19 -4
- package/dist/modules/invitations/controllers/invitations.controller.d.ts.map +1 -1
- package/dist/modules/invitations/controllers/invitations.controller.js +19 -10
- package/dist/modules/invitations/controllers/invitations.controller.js.map +1 -1
- package/dist/modules/invitations/dto/invitation.dto.d.ts +13 -0
- package/dist/modules/invitations/dto/invitation.dto.d.ts.map +1 -1
- package/dist/modules/invitations/dto/invitation.dto.js +69 -2
- package/dist/modules/invitations/dto/invitation.dto.js.map +1 -1
- package/dist/modules/invitations/services/invitations.service.d.ts +24 -6
- package/dist/modules/invitations/services/invitations.service.d.ts.map +1 -1
- package/dist/modules/invitations/services/invitations.service.js +96 -20
- package/dist/modules/invitations/services/invitations.service.js.map +1 -1
- package/dist/modules/jobs/queues/jobs.queue.d.ts +7 -2
- package/dist/modules/jobs/queues/jobs.queue.d.ts.map +1 -1
- package/dist/modules/jobs/queues/jobs.queue.js +25 -10
- package/dist/modules/jobs/queues/jobs.queue.js.map +1 -1
- package/dist/modules/notifications/controllers/notifications.controller.d.ts +3 -1
- package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -1
- package/dist/modules/notifications/controllers/notifications.controller.js +25 -2
- package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -1
- package/dist/modules/notifications/dto/notification-query.dto.d.ts.map +1 -1
- package/dist/modules/notifications/dto/notification-query.dto.js +1 -0
- package/dist/modules/notifications/dto/notification-query.dto.js.map +1 -1
- package/dist/modules/notifications/entities/device-token.entity.d.ts.map +1 -1
- package/dist/modules/notifications/entities/device-token.entity.js +3 -1
- package/dist/modules/notifications/entities/device-token.entity.js.map +1 -1
- package/dist/modules/notifications/services/fcm.service.d.ts +2 -0
- package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -1
- package/dist/modules/notifications/services/fcm.service.js +28 -7
- package/dist/modules/notifications/services/fcm.service.js.map +1 -1
- package/dist/modules/notifications/services/notifications.service.d.ts +16 -3
- package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -1
- package/dist/modules/notifications/services/notifications.service.js +95 -24
- package/dist/modules/notifications/services/notifications.service.js.map +1 -1
- package/dist/modules/observability/metrics/metrics.service.d.ts +2 -0
- package/dist/modules/observability/metrics/metrics.service.d.ts.map +1 -1
- package/dist/modules/observability/metrics/metrics.service.js +11 -0
- package/dist/modules/observability/metrics/metrics.service.js.map +1 -1
- package/dist/modules/otp/constants/otp.constants.d.ts +7 -5
- package/dist/modules/otp/constants/otp.constants.d.ts.map +1 -1
- package/dist/modules/otp/constants/otp.constants.js +11 -8
- package/dist/modules/otp/constants/otp.constants.js.map +1 -1
- package/dist/modules/otp/interfaces/otp.service.interface.d.ts +1 -1
- package/dist/modules/otp/interfaces/otp.service.interface.d.ts.map +1 -1
- package/dist/modules/otp/otp.service.d.ts +10 -2
- package/dist/modules/otp/otp.service.d.ts.map +1 -1
- package/dist/modules/otp/otp.service.js +48 -4
- package/dist/modules/otp/otp.service.js.map +1 -1
- package/dist/modules/otp/services/otp.rate-limiter.d.ts +2 -0
- package/dist/modules/otp/services/otp.rate-limiter.d.ts.map +1 -1
- package/dist/modules/otp/services/otp.rate-limiter.js +19 -0
- package/dist/modules/otp/services/otp.rate-limiter.js.map +1 -1
- package/dist/modules/otp/services/otp.session.store.d.ts +9 -3
- package/dist/modules/otp/services/otp.session.store.d.ts.map +1 -1
- package/dist/modules/otp/services/otp.session.store.js +34 -42
- package/dist/modules/otp/services/otp.session.store.js.map +1 -1
- package/dist/modules/otp/utils/otp-code-hash.util.d.ts +11 -0
- package/dist/modules/otp/utils/otp-code-hash.util.d.ts.map +1 -0
- package/dist/modules/otp/utils/otp-code-hash.util.js +68 -0
- package/dist/modules/otp/utils/otp-code-hash.util.js.map +1 -0
- package/dist/modules/profile/controllers/profile.controller.d.ts +9 -3
- package/dist/modules/profile/controllers/profile.controller.d.ts.map +1 -1
- package/dist/modules/profile/controllers/profile.controller.js +140 -8
- package/dist/modules/profile/controllers/profile.controller.js.map +1 -1
- package/dist/modules/profile/dto/create-user-profile.dto.d.ts +10 -0
- package/dist/modules/profile/dto/create-user-profile.dto.d.ts.map +1 -1
- package/dist/modules/profile/dto/create-user-profile.dto.js +43 -1
- package/dist/modules/profile/dto/create-user-profile.dto.js.map +1 -1
- package/dist/modules/profile/dto/public-user-profile.dto.d.ts +24 -0
- package/dist/modules/profile/dto/public-user-profile.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/public-user-profile.dto.js +115 -0
- package/dist/modules/profile/dto/public-user-profile.dto.js.map +1 -0
- package/dist/modules/profile/dto/user-profile-response.dto.d.ts +4 -0
- package/dist/modules/profile/dto/user-profile-response.dto.d.ts.map +1 -1
- package/dist/modules/profile/dto/user-profile-response.dto.js +4 -0
- package/dist/modules/profile/dto/user-profile-response.dto.js.map +1 -1
- package/dist/modules/profile/dto/username-available.dto.d.ts +6 -0
- package/dist/modules/profile/dto/username-available.dto.d.ts.map +1 -0
- package/dist/modules/profile/dto/username-available.dto.js +31 -0
- package/dist/modules/profile/dto/username-available.dto.js.map +1 -0
- package/dist/modules/profile/entities/user-profiles.entity.d.ts +10 -0
- package/dist/modules/profile/entities/user-profiles.entity.d.ts.map +1 -1
- package/dist/modules/profile/entities/user-profiles.entity.js +29 -1
- package/dist/modules/profile/entities/user-profiles.entity.js.map +1 -1
- package/dist/modules/profile/index.d.ts +1 -0
- package/dist/modules/profile/index.d.ts.map +1 -1
- package/dist/modules/profile/index.js +1 -0
- package/dist/modules/profile/index.js.map +1 -1
- package/dist/modules/profile/profile.manifest.d.ts +2 -2
- package/dist/modules/profile/profile.manifest.js +2 -2
- package/dist/modules/profile/profile.manifest.js.map +1 -1
- package/dist/modules/profile/profile.module.d.ts.map +1 -1
- package/dist/modules/profile/profile.module.js +7 -2
- package/dist/modules/profile/profile.module.js.map +1 -1
- package/dist/modules/profile/services/profile.service.d.ts +56 -4
- package/dist/modules/profile/services/profile.service.d.ts.map +1 -1
- package/dist/modules/profile/services/profile.service.js +247 -20
- package/dist/modules/profile/services/profile.service.js.map +1 -1
- package/dist/modules/realtime/adapters/redis-io.adapter.d.ts +26 -0
- package/dist/modules/realtime/adapters/redis-io.adapter.d.ts.map +1 -0
- package/dist/modules/realtime/adapters/redis-io.adapter.js +124 -0
- package/dist/modules/realtime/adapters/redis-io.adapter.js.map +1 -0
- package/dist/modules/realtime/constants/realtime.constants.d.ts +36 -0
- package/dist/modules/realtime/constants/realtime.constants.d.ts.map +1 -0
- package/dist/modules/realtime/constants/realtime.constants.js +42 -0
- package/dist/modules/realtime/constants/realtime.constants.js.map +1 -0
- package/dist/modules/realtime/controllers/realtime.controller.d.ts +21 -0
- package/dist/modules/realtime/controllers/realtime.controller.d.ts.map +1 -0
- package/dist/modules/realtime/controllers/realtime.controller.js +113 -0
- package/dist/modules/realtime/controllers/realtime.controller.js.map +1 -0
- package/dist/modules/realtime/gateway/realtime.gateway.d.ts +42 -0
- package/dist/modules/realtime/gateway/realtime.gateway.d.ts.map +1 -0
- package/dist/modules/realtime/gateway/realtime.gateway.js +289 -0
- package/dist/modules/realtime/gateway/realtime.gateway.js.map +1 -0
- package/dist/modules/realtime/index.d.ts +12 -0
- package/dist/modules/realtime/index.d.ts.map +1 -0
- package/dist/modules/realtime/index.js +35 -0
- package/dist/modules/realtime/index.js.map +1 -0
- package/dist/modules/realtime/realtime.manifest.d.ts +8 -0
- package/dist/modules/realtime/realtime.manifest.d.ts.map +1 -0
- package/dist/modules/realtime/realtime.manifest.js +31 -0
- package/dist/modules/realtime/realtime.manifest.js.map +1 -0
- package/dist/modules/realtime/realtime.module.d.ts +14 -0
- package/dist/modules/realtime/realtime.module.d.ts.map +1 -0
- package/dist/modules/realtime/realtime.module.js +126 -0
- package/dist/modules/realtime/realtime.module.js.map +1 -0
- package/dist/modules/realtime/services/realtime-handler.registry.d.ts +16 -0
- package/dist/modules/realtime/services/realtime-handler.registry.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime-handler.registry.js +55 -0
- package/dist/modules/realtime/services/realtime-handler.registry.js.map +1 -0
- package/dist/modules/realtime/services/realtime-presence.service.d.ts +15 -0
- package/dist/modules/realtime/services/realtime-presence.service.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime-presence.service.js +86 -0
- package/dist/modules/realtime/services/realtime-presence.service.js.map +1 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts +12 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.js +63 -0
- package/dist/modules/realtime/services/realtime-rate-limiter.service.js.map +1 -0
- package/dist/modules/realtime/services/realtime.service.d.ts +88 -0
- package/dist/modules/realtime/services/realtime.service.d.ts.map +1 -0
- package/dist/modules/realtime/services/realtime.service.js +343 -0
- package/dist/modules/realtime/services/realtime.service.js.map +1 -0
- package/dist/modules/realtime/types/realtime.types.d.ts +50 -0
- package/dist/modules/realtime/types/realtime.types.d.ts.map +1 -0
- package/dist/modules/realtime/types/realtime.types.js +14 -0
- package/dist/modules/realtime/types/realtime.types.js.map +1 -0
- package/dist/modules/realtime/utils/handshake-error.util.d.ts +5 -0
- package/dist/modules/realtime/utils/handshake-error.util.d.ts.map +1 -0
- package/dist/modules/realtime/utils/handshake-error.util.js +45 -0
- package/dist/modules/realtime/utils/handshake-error.util.js.map +1 -0
- package/dist/modules/roles/controllers/modules.controller.d.ts +4 -3
- package/dist/modules/roles/controllers/modules.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/modules.controller.js +21 -10
- package/dist/modules/roles/controllers/modules.controller.js.map +1 -1
- package/dist/modules/roles/controllers/permissions.controller.d.ts +4 -3
- package/dist/modules/roles/controllers/permissions.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/permissions.controller.js +21 -10
- package/dist/modules/roles/controllers/permissions.controller.js.map +1 -1
- package/dist/modules/roles/controllers/roles.controller.d.ts +5 -4
- package/dist/modules/roles/controllers/roles.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/roles.controller.js +26 -13
- package/dist/modules/roles/controllers/roles.controller.js.map +1 -1
- package/dist/modules/roles/controllers/user-roles.controller.d.ts +3 -2
- package/dist/modules/roles/controllers/user-roles.controller.d.ts.map +1 -1
- package/dist/modules/roles/controllers/user-roles.controller.js +14 -6
- package/dist/modules/roles/controllers/user-roles.controller.js.map +1 -1
- package/dist/modules/roles/services/modules.service.d.ts +8 -5
- package/dist/modules/roles/services/modules.service.d.ts.map +1 -1
- package/dist/modules/roles/services/modules.service.js +58 -12
- package/dist/modules/roles/services/modules.service.js.map +1 -1
- package/dist/modules/roles/services/permissions.service.d.ts +8 -5
- package/dist/modules/roles/services/permissions.service.d.ts.map +1 -1
- package/dist/modules/roles/services/permissions.service.js +61 -12
- package/dist/modules/roles/services/permissions.service.js.map +1 -1
- package/dist/modules/roles/services/roles.service.d.ts +19 -9
- package/dist/modules/roles/services/roles.service.d.ts.map +1 -1
- package/dist/modules/roles/services/roles.service.js +137 -47
- package/dist/modules/roles/services/roles.service.js.map +1 -1
- package/dist/modules/roles/services/user-roles.service.d.ts +12 -4
- package/dist/modules/roles/services/user-roles.service.d.ts.map +1 -1
- package/dist/modules/roles/services/user-roles.service.js +58 -26
- package/dist/modules/roles/services/user-roles.service.js.map +1 -1
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts +7 -1
- package/dist/modules/sessions/entities/refresh-token.entity.d.ts.map +1 -1
- package/dist/modules/sessions/entities/refresh-token.entity.js +10 -0
- package/dist/modules/sessions/entities/refresh-token.entity.js.map +1 -1
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts +12 -0
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts.map +1 -0
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.js +46 -0
- package/dist/modules/sessions/entities/revoked-refresh-family.entity.js.map +1 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.d.ts +20 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.d.ts.map +1 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.js +97 -0
- package/dist/modules/sessions/services/refresh-token-retention.service.js.map +1 -0
- package/dist/modules/sessions/services/token.service.d.ts +150 -16
- package/dist/modules/sessions/services/token.service.d.ts.map +1 -1
- package/dist/modules/sessions/services/token.service.js +505 -74
- package/dist/modules/sessions/services/token.service.js.map +1 -1
- package/dist/modules/sessions/sessions.module.d.ts.map +1 -1
- package/dist/modules/sessions/sessions.module.js +4 -2
- package/dist/modules/sessions/sessions.module.js.map +1 -1
- package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts +13 -0
- package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts.map +1 -0
- package/dist/modules/sessions/utils/refresh-token-hash.util.js +37 -0
- package/dist/modules/sessions/utils/refresh-token-hash.util.js.map +1 -0
- package/dist/modules/settings/constants/settings.defaults.d.ts +57 -3
- package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -1
- package/dist/modules/settings/constants/settings.defaults.js +58 -3
- package/dist/modules/settings/constants/settings.defaults.js.map +1 -1
- package/dist/modules/settings/constants/settings.keys.d.ts +138 -2
- package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -1
- package/dist/modules/settings/constants/settings.keys.js +140 -2
- package/dist/modules/settings/constants/settings.keys.js.map +1 -1
- package/dist/modules/settings/controllers/settings.controller.d.ts +5 -1
- package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -1
- package/dist/modules/settings/controllers/settings.controller.js +134 -5
- package/dist/modules/settings/controllers/settings.controller.js.map +1 -1
- package/dist/modules/settings/services/settings.service.d.ts +17 -7
- package/dist/modules/settings/services/settings.service.d.ts.map +1 -1
- package/dist/modules/settings/services/settings.service.js +80 -14
- package/dist/modules/settings/services/settings.service.js.map +1 -1
- package/dist/modules/settings/utils/settings-secret.util.d.ts +13 -0
- package/dist/modules/settings/utils/settings-secret.util.d.ts.map +1 -0
- package/dist/modules/settings/utils/settings-secret.util.js +80 -0
- package/dist/modules/settings/utils/settings-secret.util.js.map +1 -0
- package/dist/modules/users/controllers/users.controller.d.ts +4 -2
- package/dist/modules/users/controllers/users.controller.d.ts.map +1 -1
- package/dist/modules/users/controllers/users.controller.js +89 -10
- package/dist/modules/users/controllers/users.controller.js.map +1 -1
- package/dist/modules/users/dto/user.dto.d.ts +5 -0
- package/dist/modules/users/dto/user.dto.d.ts.map +1 -1
- package/dist/modules/users/dto/user.dto.js +46 -5
- package/dist/modules/users/dto/user.dto.js.map +1 -1
- package/dist/modules/users/entities/user.entity.d.ts +7 -1
- package/dist/modules/users/entities/user.entity.d.ts.map +1 -1
- package/dist/modules/users/entities/user.entity.js +10 -0
- package/dist/modules/users/entities/user.entity.js.map +1 -1
- package/dist/modules/users/services/users.service.d.ts +15 -2
- package/dist/modules/users/services/users.service.d.ts.map +1 -1
- package/dist/modules/users/services/users.service.js +152 -37
- package/dist/modules/users/services/users.service.js.map +1 -1
- package/dist/modules/users/users.module.d.ts.map +1 -1
- package/dist/modules/users/users.module.js +1 -2
- package/dist/modules/users/users.module.js.map +1 -1
- package/package.json +19 -7
- package/dist/modules/admin/entities/admin-log.entity.d.ts +0 -20
- package/dist/modules/admin/entities/admin-log.entity.d.ts.map +0 -1
- package/dist/modules/admin/entities/admin-log.entity.js +0 -65
- package/dist/modules/admin/entities/admin-log.entity.js.map +0 -1
|
@@ -41,27 +41,46 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
41
41
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
42
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
43
|
};
|
|
44
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
45
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
46
|
+
};
|
|
44
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
48
|
exports.AccountService = void 0;
|
|
46
49
|
const common_1 = require("@nestjs/common");
|
|
47
50
|
const argon2 = __importStar(require("argon2"));
|
|
51
|
+
const typeorm_1 = require("typeorm");
|
|
52
|
+
const audit_actions_1 = require("../../audit/constants/audit-actions");
|
|
53
|
+
const audit_service_1 = require("../../audit/services/audit.service");
|
|
48
54
|
const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
|
|
49
55
|
const refresh_token_entity_1 = require("../../sessions/entities/refresh-token.entity");
|
|
50
56
|
const token_service_1 = require("../../sessions/services/token.service");
|
|
51
57
|
const user_entity_1 = require("../../users/entities/user.entity");
|
|
52
58
|
const users_service_1 = require("../../users/services/users.service");
|
|
59
|
+
const auth_events_1 = require("../events/auth.events");
|
|
53
60
|
const auth_params_util_1 = require("../utils/auth-params.util");
|
|
61
|
+
const mfa_service_1 = require("./mfa.service");
|
|
62
|
+
const oauth_service_1 = require("./oauth.service");
|
|
54
63
|
const otp_auth_service_1 = require("./otp-auth.service");
|
|
55
64
|
let AccountService = class AccountService {
|
|
56
65
|
tokenService;
|
|
57
66
|
usersService;
|
|
58
67
|
otpAuthService;
|
|
68
|
+
oauthService;
|
|
69
|
+
mfaService;
|
|
59
70
|
logger;
|
|
60
|
-
|
|
71
|
+
audit;
|
|
72
|
+
dataSource;
|
|
73
|
+
eventEmitter;
|
|
74
|
+
constructor(tokenService, usersService, otpAuthService, oauthService, mfaService, logger, audit, dataSource, eventEmitter = null) {
|
|
61
75
|
this.tokenService = tokenService;
|
|
62
76
|
this.usersService = usersService;
|
|
63
77
|
this.otpAuthService = otpAuthService;
|
|
78
|
+
this.oauthService = oauthService;
|
|
79
|
+
this.mfaService = mfaService;
|
|
64
80
|
this.logger = logger;
|
|
81
|
+
this.audit = audit;
|
|
82
|
+
this.dataSource = dataSource;
|
|
83
|
+
this.eventEmitter = eventEmitter;
|
|
65
84
|
}
|
|
66
85
|
// ─── Email Verification ───────────────────────────────────────────────────
|
|
67
86
|
/**
|
|
@@ -85,21 +104,129 @@ let AccountService = class AccountService {
|
|
|
85
104
|
if (verifiedEmail.toLowerCase() !== user.email.toLowerCase()) {
|
|
86
105
|
throw new common_1.UnauthorizedException('Verification token does not match your account email address.');
|
|
87
106
|
}
|
|
88
|
-
await this.
|
|
107
|
+
await this.dataSource.transaction(async (manager) => {
|
|
108
|
+
await this.usersService.markEmailVerified(userId, manager);
|
|
109
|
+
await this.audit.recordInTransaction(manager, {
|
|
110
|
+
action: audit_actions_1.AUDIT_ACTIONS.EMAIL_VERIFIED,
|
|
111
|
+
actorType: 'USER',
|
|
112
|
+
actorId: userId,
|
|
113
|
+
resourceType: 'user',
|
|
114
|
+
resourceId: userId,
|
|
115
|
+
});
|
|
116
|
+
});
|
|
89
117
|
this.logger.info('Email verified', {
|
|
90
118
|
event: 'auth.email.verified',
|
|
91
119
|
metadata: { userId },
|
|
92
120
|
});
|
|
93
121
|
return { message: 'Email verified successfully.' };
|
|
94
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Change email via OTP on the **new** address (send-otp → verify challenge here).
|
|
125
|
+
*/
|
|
126
|
+
async changeEmail(userId, dto) {
|
|
127
|
+
await this.mfaService.assertSensitiveReauth(userId, {
|
|
128
|
+
purpose: 'change_email',
|
|
129
|
+
stepUpToken: dto.stepUpToken,
|
|
130
|
+
password: dto.password,
|
|
131
|
+
verificationId: dto.reauthVerificationId,
|
|
132
|
+
otp: dto.reauthOtp,
|
|
133
|
+
provider: dto.provider,
|
|
134
|
+
idToken: dto.idToken,
|
|
135
|
+
});
|
|
136
|
+
const { subject: email, channel } = await this.otpAuthService.verifyOtpChallengeWithSubject(dto.verificationId, dto.otp);
|
|
137
|
+
if (channel !== 'email') {
|
|
138
|
+
throw new common_1.BadRequestException('Change-email requires an email-channel OTP. Call POST /auth/send-otp with channel=email.');
|
|
139
|
+
}
|
|
140
|
+
const normalized = email.trim().toLowerCase();
|
|
141
|
+
const existing = await this.usersService.findBy({ email: normalized });
|
|
142
|
+
if (existing && existing.id !== userId) {
|
|
143
|
+
throw new common_1.ConflictException('Email address already in use');
|
|
144
|
+
}
|
|
145
|
+
await this.usersService.update(userId, { email: normalized, isEmailVerified: true }, { skipIdentitySessionRevoke: true });
|
|
146
|
+
// Identity change invalidates other devices (same posture as password reset).
|
|
147
|
+
await this.tokenService.revokeAllUserTokens(userId, refresh_token_entity_1.RevokeReason.LOGOUT);
|
|
148
|
+
this.logger.info('Email changed', {
|
|
149
|
+
event: 'auth.email.changed',
|
|
150
|
+
metadata: { userId },
|
|
151
|
+
});
|
|
152
|
+
this.emitIdentityEvent(auth_events_1.AUTH_EVENTS.EMAIL_CHANGED, userId);
|
|
153
|
+
return {
|
|
154
|
+
message: 'Email address updated and verified. All sessions have been revoked.',
|
|
155
|
+
};
|
|
156
|
+
}
|
|
95
157
|
// ─── Session Management ───────────────────────────────────────────────────
|
|
96
|
-
|
|
158
|
+
/** Revoke every refresh token for the user (logout-all). */
|
|
159
|
+
async logoutAll(userId, ctx) {
|
|
97
160
|
await this.tokenService.revokeAllUserTokens(userId, refresh_token_entity_1.RevokeReason.LOGOUT);
|
|
98
|
-
this.logger.info('User logged out', {
|
|
99
|
-
event: 'auth.logout',
|
|
161
|
+
this.logger.info('User logged out (all sessions)', {
|
|
162
|
+
event: 'auth.logout.all',
|
|
100
163
|
metadata: { userId },
|
|
101
164
|
});
|
|
102
|
-
|
|
165
|
+
this.emitLogoutEvent(auth_events_1.AUTH_EVENTS.LOGOUT_ALL, userId, ctx);
|
|
166
|
+
return { message: 'Logged out of all sessions successfully' };
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Logout-all with refresh-token ownership proof (stolen access JWT alone cannot wipe devices).
|
|
170
|
+
*/
|
|
171
|
+
async logoutAllWithRefresh(userId, refreshToken, ctx) {
|
|
172
|
+
const session = await this.tokenService.resolveRefreshTokenSession(refreshToken);
|
|
173
|
+
if (session.userId !== userId) {
|
|
174
|
+
throw new common_1.ForbiddenException('Refresh token does not belong to the authenticated user');
|
|
175
|
+
}
|
|
176
|
+
return this.logoutAll(userId, ctx);
|
|
177
|
+
}
|
|
178
|
+
/** Revoke only the refresh-token family for the provided refresh token. */
|
|
179
|
+
async logoutCurrent(userId, refreshToken, ctx) {
|
|
180
|
+
// Ownership first — never revoke another user's family on a mismatched JWT/refresh pair.
|
|
181
|
+
const session = await this.tokenService.resolveRefreshTokenSession(refreshToken);
|
|
182
|
+
if (session.userId !== userId) {
|
|
183
|
+
throw new common_1.ForbiddenException('Refresh token does not belong to the authenticated user');
|
|
184
|
+
}
|
|
185
|
+
return this.logoutCurrentFamily(userId, session.familyId, ctx);
|
|
186
|
+
}
|
|
187
|
+
/** Revoke the current session family from the access-token `fid` claim (no refresh required). */
|
|
188
|
+
async logoutCurrentFamily(userId, familyId, ctx) {
|
|
189
|
+
await this.tokenService.revokeFamilyTokens(familyId, refresh_token_entity_1.RevokeReason.LOGOUT);
|
|
190
|
+
this.logger.info('User logged out (current session)', {
|
|
191
|
+
event: 'auth.logout.current',
|
|
192
|
+
metadata: { userId, familyId },
|
|
193
|
+
});
|
|
194
|
+
this.emitLogoutEvent(auth_events_1.AUTH_EVENTS.LOGOUT, userId, ctx);
|
|
195
|
+
return { message: 'Logged out of current session successfully' };
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Keep the current refresh-token family; revoke every other session.
|
|
199
|
+
* Bumps session epoch (kills other access JWTs), then rotates the kept
|
|
200
|
+
* refresh token and returns a fresh token envelope for the current device.
|
|
201
|
+
*/
|
|
202
|
+
async revokeOtherSessions(userId, refreshToken, deviceInfo, ipAddress, dpopJkt) {
|
|
203
|
+
const session = await this.tokenService.resolveRefreshTokenSession(refreshToken);
|
|
204
|
+
if (session.userId !== userId) {
|
|
205
|
+
throw new common_1.ForbiddenException('Refresh token does not belong to the authenticated user');
|
|
206
|
+
}
|
|
207
|
+
// Epoch bump below invalidates all access JWTs — skip per-family denylist load.
|
|
208
|
+
await this.tokenService.revokeAllUserTokensExceptFamily(userId, session.familyId, refresh_token_entity_1.RevokeReason.LOGOUT, { denyFamilies: false });
|
|
209
|
+
// Kill in-flight access JWTs on other devices; kept device gets new sev below.
|
|
210
|
+
await this.tokenService.bumpSessionEpoch(userId);
|
|
211
|
+
const tokens = await this.tokenService.rotateRefreshToken(refreshToken, deviceInfo, ipAddress, dpopJkt);
|
|
212
|
+
this.logger.info('Other sessions revoked', {
|
|
213
|
+
event: 'auth.sessions.revoke_others',
|
|
214
|
+
metadata: { userId, keepFamilyId: session.familyId },
|
|
215
|
+
});
|
|
216
|
+
this.audit.record({
|
|
217
|
+
action: audit_actions_1.AUDIT_ACTIONS.SESSIONS_REVOKE_OTHERS,
|
|
218
|
+
actorType: 'USER',
|
|
219
|
+
actorId: userId,
|
|
220
|
+
resourceType: 'user',
|
|
221
|
+
resourceId: userId,
|
|
222
|
+
metadata: { keepFamilyId: session.familyId },
|
|
223
|
+
ipAddress,
|
|
224
|
+
deviceInfo,
|
|
225
|
+
});
|
|
226
|
+
return {
|
|
227
|
+
...tokens,
|
|
228
|
+
message: 'All other sessions revoked successfully. Use the new access and refresh tokens.',
|
|
229
|
+
};
|
|
103
230
|
}
|
|
104
231
|
async revokeSession(sessionId, requestingUserId) {
|
|
105
232
|
const token = await this.tokenService.getRefreshTokenById(sessionId);
|
|
@@ -107,27 +234,46 @@ let AccountService = class AccountService {
|
|
|
107
234
|
throw new common_1.NotFoundException('Session not found');
|
|
108
235
|
if (token.userId !== requestingUserId)
|
|
109
236
|
throw new common_1.ForbiddenException('Access denied');
|
|
110
|
-
|
|
237
|
+
// Revoke the whole rotation family so rotated siblings cannot continue the session.
|
|
238
|
+
await this.tokenService.revokeFamilyTokens(token.familyId, refresh_token_entity_1.RevokeReason.LOGOUT);
|
|
239
|
+
this.audit.record({
|
|
240
|
+
action: audit_actions_1.AUDIT_ACTIONS.SESSION_REVOKED,
|
|
241
|
+
actorType: 'USER',
|
|
242
|
+
actorId: requestingUserId,
|
|
243
|
+
resourceType: 'session',
|
|
244
|
+
resourceId: sessionId,
|
|
245
|
+
metadata: { familyId: token.familyId },
|
|
246
|
+
});
|
|
111
247
|
return { message: 'Session revoked successfully' };
|
|
112
248
|
}
|
|
113
|
-
async getActiveSessions(userId) {
|
|
114
|
-
return this.tokenService.getUserActiveSessions(userId);
|
|
249
|
+
async getActiveSessions(userId, opts) {
|
|
250
|
+
return this.tokenService.getUserActiveSessions(userId, opts);
|
|
115
251
|
}
|
|
116
252
|
// ─── Account Deletion ─────────────────────────────────────────────────────
|
|
117
253
|
/**
|
|
118
254
|
* Step 1 — Request account deletion.
|
|
119
255
|
*
|
|
120
256
|
* Phone users: sends an OTP challenge. Returns verificationId + expiresAt.
|
|
121
|
-
* Email
|
|
257
|
+
* Email users: confirm with password.
|
|
258
|
+
* OAuth users: confirm with a fresh ID token.
|
|
122
259
|
*/
|
|
123
260
|
async requestDeletion(userId) {
|
|
124
261
|
const user = await this.usersService.findByIdOrFail(userId);
|
|
262
|
+
this.emitAccountDeleteEvent(auth_events_1.AUTH_EVENTS.ACCOUNT_DELETE_REQUESTED, userId);
|
|
125
263
|
if (user.authMethod === user_entity_1.UserAuthMethod.EMAIL) {
|
|
126
264
|
return {
|
|
127
|
-
message: 'Confirm deletion with your account password via POST /auth/account/delete-confirm.'
|
|
265
|
+
message: 'Confirm deletion with your account password via POST /auth/account/delete-confirm. ' +
|
|
266
|
+
'If MFA is enrolled, also pass stepUpToken (purpose=account_delete).',
|
|
128
267
|
requiresPassword: true,
|
|
129
268
|
};
|
|
130
269
|
}
|
|
270
|
+
if (user.authMethod === user_entity_1.UserAuthMethod.OAUTH) {
|
|
271
|
+
return {
|
|
272
|
+
message: 'Confirm deletion with a fresh OAuth ID token via POST /auth/account/delete-confirm { provider, idToken }. ' +
|
|
273
|
+
'If MFA is enrolled, also pass stepUpToken (purpose=account_delete).',
|
|
274
|
+
requiresOAuth: true,
|
|
275
|
+
};
|
|
276
|
+
}
|
|
131
277
|
if (!user.phoneNumber) {
|
|
132
278
|
throw new common_1.BadRequestException('Phone auth account has no phone number on file. Contact support to delete your account.');
|
|
133
279
|
}
|
|
@@ -137,7 +283,8 @@ let AccountService = class AccountService {
|
|
|
137
283
|
metadata: { userId },
|
|
138
284
|
});
|
|
139
285
|
return {
|
|
140
|
-
message: 'A confirmation code has been sent to your phone. Use it to confirm account deletion.'
|
|
286
|
+
message: 'A confirmation code has been sent to your phone. Use it to confirm account deletion. ' +
|
|
287
|
+
'If MFA is enrolled, also pass stepUpToken (purpose=account_delete).',
|
|
141
288
|
verificationId: result.data.verificationId,
|
|
142
289
|
expiresAt: result.data.expiresAt,
|
|
143
290
|
};
|
|
@@ -145,59 +292,128 @@ let AccountService = class AccountService {
|
|
|
145
292
|
/**
|
|
146
293
|
* Step 2 — Confirm account deletion.
|
|
147
294
|
*
|
|
148
|
-
* Phone path: { verificationId, otp }
|
|
149
|
-
* Email path: { password }
|
|
150
|
-
*
|
|
151
|
-
*
|
|
295
|
+
* Phone path: { verificationId, otp }
|
|
296
|
+
* Email path: { password }
|
|
297
|
+
* OAuth path: { provider, idToken }
|
|
298
|
+
* MFA enrolled: also requires step-up with purpose=`account_delete`.
|
|
152
299
|
*/
|
|
153
300
|
async confirmDeletion(userId, dto) {
|
|
154
|
-
|
|
301
|
+
// MFA-enrolled accounts must prove TOTP/backup via step-up; first-factor alone is not enough.
|
|
302
|
+
await this.mfaService.consumeStepUpIfRequired(userId, dto.stepUpToken, 'account_delete');
|
|
155
303
|
await this.verifyDeletionChallenge(userId, dto);
|
|
156
|
-
// Revoke all local sessions before deletion
|
|
157
304
|
await this.tokenService.revokeAllUserTokens(userId, refresh_token_entity_1.RevokeReason.LOGOUT);
|
|
158
305
|
await this.usersService.delete(userId);
|
|
159
306
|
this.logger.info('Account deletion completed', {
|
|
160
307
|
event: 'auth.account.delete_completed',
|
|
161
308
|
metadata: { userId },
|
|
162
309
|
});
|
|
310
|
+
this.emitAccountDeleteEvent(auth_events_1.AUTH_EVENTS.ACCOUNT_DELETED, userId);
|
|
163
311
|
return { message: 'Your account has been deleted.' };
|
|
164
312
|
}
|
|
165
313
|
// ─── Private Helpers ─────────────────────────────────────────────────────
|
|
166
|
-
/**
|
|
167
|
-
* Validates the confirmation challenge before deletion proceeds.
|
|
168
|
-
* Exactly one of phone OTP or email password must be provided.
|
|
169
|
-
*/
|
|
170
314
|
async verifyDeletionChallenge(userId, dto) {
|
|
171
|
-
const user = await this.usersService.findByIdOrFail(userId);
|
|
172
315
|
const mode = (0, auth_params_util_1.resolveDeleteConfirmMode)(dto);
|
|
173
316
|
if (mode === 'ambiguous' || mode === 'missing') {
|
|
174
317
|
throw new common_1.BadRequestException(auth_params_util_1.DELETE_CONFIRM_PARAMS_ERROR);
|
|
175
318
|
}
|
|
319
|
+
// Email path needs passwordHash — load once with secrets instead of double find.
|
|
320
|
+
const user = mode === 'email'
|
|
321
|
+
? await this.usersService.findByIdWithPassword(userId)
|
|
322
|
+
: await this.usersService.findByIdOrFail(userId);
|
|
323
|
+
if (!user) {
|
|
324
|
+
throw new common_1.NotFoundException('User not found');
|
|
325
|
+
}
|
|
176
326
|
if (mode === 'phone' && user.authMethod !== user_entity_1.UserAuthMethod.PHONE) {
|
|
177
|
-
throw new common_1.BadRequestException('
|
|
327
|
+
throw new common_1.BadRequestException('Phone OTP confirmation is only valid for phone-auth accounts.');
|
|
178
328
|
}
|
|
179
329
|
if (mode === 'email' && user.authMethod !== user_entity_1.UserAuthMethod.EMAIL) {
|
|
180
|
-
throw new common_1.BadRequestException('
|
|
330
|
+
throw new common_1.BadRequestException('Password confirmation is only valid for email-auth accounts.');
|
|
331
|
+
}
|
|
332
|
+
if (mode === 'oauth' && user.authMethod !== user_entity_1.UserAuthMethod.OAUTH) {
|
|
333
|
+
throw new common_1.BadRequestException('OAuth confirmation is only valid for OAuth-auth accounts.');
|
|
181
334
|
}
|
|
182
335
|
if (mode === 'phone') {
|
|
183
|
-
|
|
336
|
+
if (!user.phoneNumber) {
|
|
337
|
+
throw new common_1.BadRequestException('Phone auth account has no phone number on file. Contact support to delete your account.');
|
|
338
|
+
}
|
|
339
|
+
const { subject, channel } = await this.otpAuthService
|
|
340
|
+
.verifyOtpChallengeWithSubject(dto.verificationId, dto.otp)
|
|
341
|
+
.catch(() => {
|
|
342
|
+
throw new common_1.UnauthorizedException('Invalid or expired OTP code.');
|
|
343
|
+
});
|
|
344
|
+
if (channel !== 'sms') {
|
|
345
|
+
throw new common_1.BadRequestException('Account deletion requires an SMS OTP sent to your account phone number.');
|
|
346
|
+
}
|
|
347
|
+
if (subject !== user.phoneNumber) {
|
|
348
|
+
throw new common_1.UnauthorizedException('OTP was not issued for this account phone number.');
|
|
349
|
+
}
|
|
184
350
|
return;
|
|
185
351
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
352
|
+
if (mode === 'oauth') {
|
|
353
|
+
await this.oauthService.assertLinkedIdentity(userId, dto.provider, dto.idToken);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
if (!user.passwordHash) {
|
|
357
|
+
throw new common_1.BadRequestException('This account has no password. Use the phone OTP or OAuth confirmation instead.');
|
|
189
358
|
}
|
|
190
|
-
const valid = await argon2.verify(
|
|
359
|
+
const valid = await argon2.verify(user.passwordHash, dto.password);
|
|
191
360
|
if (!valid)
|
|
192
361
|
throw new common_1.UnauthorizedException('Incorrect password.');
|
|
193
362
|
}
|
|
363
|
+
emitIdentityEvent(event, userId) {
|
|
364
|
+
if (!this.eventEmitter)
|
|
365
|
+
return;
|
|
366
|
+
const payload = { userId, at: new Date() };
|
|
367
|
+
void this.eventEmitter.emitAsync(event, payload).catch((err) => {
|
|
368
|
+
this.logger.error('Auth identity event listener failed', {
|
|
369
|
+
event: 'auth.identity.event_failed',
|
|
370
|
+
metadata: { listener: event },
|
|
371
|
+
err: err instanceof Error ? err : undefined,
|
|
372
|
+
});
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
emitAccountDeleteEvent(event, userId) {
|
|
376
|
+
if (!this.eventEmitter)
|
|
377
|
+
return;
|
|
378
|
+
const payload = { userId, at: new Date() };
|
|
379
|
+
void this.eventEmitter.emitAsync(event, payload).catch((err) => {
|
|
380
|
+
this.logger.error('Auth account-delete event listener failed', {
|
|
381
|
+
event: 'auth.account.event_failed',
|
|
382
|
+
metadata: { listener: event },
|
|
383
|
+
err: err instanceof Error ? err : undefined,
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
emitLogoutEvent(event, userId, ctx) {
|
|
388
|
+
if (!this.eventEmitter)
|
|
389
|
+
return;
|
|
390
|
+
const payload = {
|
|
391
|
+
userId,
|
|
392
|
+
at: new Date(),
|
|
393
|
+
ipAddress: ctx?.ipAddress,
|
|
394
|
+
deviceInfo: ctx?.deviceInfo,
|
|
395
|
+
};
|
|
396
|
+
void this.eventEmitter.emitAsync(event, payload).catch((err) => {
|
|
397
|
+
this.logger.error('Auth logout event listener failed', {
|
|
398
|
+
event: 'auth.logout.event_failed',
|
|
399
|
+
metadata: { listener: event },
|
|
400
|
+
err: err instanceof Error ? err : undefined,
|
|
401
|
+
});
|
|
402
|
+
});
|
|
403
|
+
}
|
|
194
404
|
};
|
|
195
405
|
exports.AccountService = AccountService;
|
|
196
406
|
exports.AccountService = AccountService = __decorate([
|
|
197
407
|
(0, common_1.Injectable)(),
|
|
408
|
+
__param(4, (0, common_1.Inject)((0, common_1.forwardRef)(() => mfa_service_1.MfaService))),
|
|
409
|
+
__param(8, (0, common_1.Optional)()),
|
|
198
410
|
__metadata("design:paramtypes", [token_service_1.TokenService,
|
|
199
411
|
users_service_1.UsersService,
|
|
200
412
|
otp_auth_service_1.OtpAuthService,
|
|
201
|
-
|
|
413
|
+
oauth_service_1.OAuthService,
|
|
414
|
+
mfa_service_1.MfaService,
|
|
415
|
+
structured_logger_service_1.StructuredLoggerService,
|
|
416
|
+
audit_service_1.AuditService,
|
|
417
|
+
typeorm_1.DataSource, Object])
|
|
202
418
|
], AccountService);
|
|
203
419
|
//# sourceMappingURL=account.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.service.js","sourceRoot":"","sources":["../../../../src/modules/auth/services/account.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAOwB;AACxB,+CAAiC;AAEjC,qGAAgG;AAChG,uFAA0F;AAC1F,yEAAqE;AACrE,kEAAkE;AAClE,sEAAkE;AAElE,gEAAkG;AAClG,yDAAoD;AAG7C,IAAM,cAAc,GAApB,MAAM,cAAc;IAER;IACA;IACA;IACA;IAJlB,YACkB,YAA0B,EAC1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U;QACd,mDAAuB;QACxB,4BAAY;QACP,oBAAU;GAV5B,cAAc,CAwc1B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { OnModuleInit } from '@nestjs/common';
|
|
2
|
+
import { ConfigService } from '@nestjs/config';
|
|
3
|
+
import { Request } from 'express';
|
|
4
|
+
import IORedis from 'ioredis';
|
|
5
|
+
import { MetricsService } from '../../observability/metrics/metrics.service';
|
|
6
|
+
import { SettingsService } from '../../settings/services/settings.service';
|
|
7
|
+
import { type DpopMode } from '../utils/dpop.util';
|
|
8
|
+
/** Transport-agnostic DPoP inputs (HTTP request or WebSocket handshake). */
|
|
9
|
+
export interface DpopAuthContext {
|
|
10
|
+
method: string;
|
|
11
|
+
/** Absolute URI used as DPoP `htu` (e.g. https://host/realtime). */
|
|
12
|
+
uri: string;
|
|
13
|
+
authorization?: string;
|
|
14
|
+
dpop?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class DpopService implements OnModuleInit {
|
|
17
|
+
private readonly settingsService;
|
|
18
|
+
private readonly configService;
|
|
19
|
+
private readonly redis;
|
|
20
|
+
private readonly metrics?;
|
|
21
|
+
private readonly nestLogger;
|
|
22
|
+
constructor(settingsService: SettingsService, configService: ConfigService, redis: IORedis, metrics?: MetricsService | undefined);
|
|
23
|
+
onModuleInit(): void;
|
|
24
|
+
mode(): DpopMode;
|
|
25
|
+
/**
|
|
26
|
+
* Resolve JKT for token issuance (login/refresh/register).
|
|
27
|
+
* - required → proof mandatory
|
|
28
|
+
* - optional → bind when proof present
|
|
29
|
+
* - off → ignore proof
|
|
30
|
+
*/
|
|
31
|
+
resolveJktForIssuance(req: Request): Promise<string | undefined>;
|
|
32
|
+
/** Validate DPoP for an access token that carries `cnf.jkt` (Express). */
|
|
33
|
+
assertProofForAccessToken(req: Request, expectedJkt: string): Promise<void>;
|
|
34
|
+
/** Validate DPoP for HTTP or WebSocket using an explicit context. */
|
|
35
|
+
assertProofForAccessTokenContext(ctx: DpopAuthContext, expectedJkt: string): Promise<void>;
|
|
36
|
+
private verifyProofContext;
|
|
37
|
+
private readProofHeader;
|
|
38
|
+
private requestUri;
|
|
39
|
+
private consumeJti;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=dpop.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dpop.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/services/dpop.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,YAAY,EAGZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,OAAO,MAAM,SAAS,CAAC;AAI9B,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,KAAK,QAAQ,EAAkC,MAAM,oBAAoB,CAAC;AAInF,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,qBACa,WAAY,YAAW,YAAY;IAI9C,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACV,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IAPtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgC;gBAGzC,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAE5B,KAAK,EAAE,OAAO,EACF,OAAO,CAAC,EAAE,cAAc,YAAA;IAGtD,YAAY,IAAI,IAAI;IAYpB,IAAI,IAAI,QAAQ;IAMhB;;;;;OAKG;IACG,qBAAqB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IA8BtE,0EAA0E;IACpE,yBAAyB,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAajF,qEAAqE;IAC/D,gCAAgC,CACrC,GAAG,EAAE,eAAe,EACpB,WAAW,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC;YAmBF,kBAAkB;IAgBhC,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,UAAU;YAQJ,UAAU;CAQxB"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
var DpopService_1;
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.DpopService = void 0;
|
|
20
|
+
const common_1 = require("@nestjs/common");
|
|
21
|
+
const config_1 = require("@nestjs/config");
|
|
22
|
+
const ioredis_1 = __importDefault(require("ioredis"));
|
|
23
|
+
const node_env_util_1 = require("../../../config/node-env.util");
|
|
24
|
+
const redis_module_1 = require("../../../config/redis.module");
|
|
25
|
+
const metrics_service_1 = require("../../observability/metrics/metrics.service");
|
|
26
|
+
const settings_keys_1 = require("../../settings/constants/settings.keys");
|
|
27
|
+
const settings_service_1 = require("../../settings/services/settings.service");
|
|
28
|
+
const dpop_util_1 = require("../utils/dpop.util");
|
|
29
|
+
const KEY_DPOP_JTI = 'dpop:jti:';
|
|
30
|
+
let DpopService = DpopService_1 = class DpopService {
|
|
31
|
+
settingsService;
|
|
32
|
+
configService;
|
|
33
|
+
redis;
|
|
34
|
+
metrics;
|
|
35
|
+
nestLogger = new common_1.Logger(DpopService_1.name);
|
|
36
|
+
constructor(settingsService, configService, redis, metrics) {
|
|
37
|
+
this.settingsService = settingsService;
|
|
38
|
+
this.configService = configService;
|
|
39
|
+
this.redis = redis;
|
|
40
|
+
this.metrics = metrics;
|
|
41
|
+
}
|
|
42
|
+
onModuleInit() {
|
|
43
|
+
if ((0, node_env_util_1.isProductionNodeEnv)(this.configService.get('app.nodeEnv')) &&
|
|
44
|
+
this.mode() === 'optional') {
|
|
45
|
+
this.nestLogger.warn('DPoP mode is optional in production. Stolen unbound access JWTs remain usable until exp. ' +
|
|
46
|
+
'Set AUTH_DPOP_MODE=required (and update clients to send DPoP) for sender-bound tokens.');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
mode() {
|
|
50
|
+
const fromEnv = this.configService.get('app.dpopMode');
|
|
51
|
+
if (fromEnv)
|
|
52
|
+
return (0, dpop_util_1.parseDpopMode)(fromEnv);
|
|
53
|
+
return (0, dpop_util_1.parseDpopMode)(this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_DPOP_MODE));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Resolve JKT for token issuance (login/refresh/register).
|
|
57
|
+
* - required → proof mandatory
|
|
58
|
+
* - optional → bind when proof present
|
|
59
|
+
* - off → ignore proof
|
|
60
|
+
*/
|
|
61
|
+
async resolveJktForIssuance(req) {
|
|
62
|
+
const mode = this.mode();
|
|
63
|
+
if (mode === 'off')
|
|
64
|
+
return undefined;
|
|
65
|
+
const proof = this.readProofHeader(req);
|
|
66
|
+
if (!proof) {
|
|
67
|
+
if (mode === 'required') {
|
|
68
|
+
throw new common_1.BadRequestException('DPoP proof required. Send a DPoP header (RFC 9449) on token-issuing requests.');
|
|
69
|
+
}
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
const verified = await this.verifyProofContext({
|
|
73
|
+
method: req.method,
|
|
74
|
+
uri: this.requestUri(req),
|
|
75
|
+
authorization: typeof req.headers.authorization === 'string'
|
|
76
|
+
? req.headers.authorization
|
|
77
|
+
: undefined,
|
|
78
|
+
dpop: proof,
|
|
79
|
+
}, proof);
|
|
80
|
+
await this.consumeJti(verified.jti);
|
|
81
|
+
return verified.jkt;
|
|
82
|
+
}
|
|
83
|
+
/** Validate DPoP for an access token that carries `cnf.jkt` (Express). */
|
|
84
|
+
async assertProofForAccessToken(req, expectedJkt) {
|
|
85
|
+
const auth = req.headers.authorization;
|
|
86
|
+
await this.assertProofForAccessTokenContext({
|
|
87
|
+
method: req.method,
|
|
88
|
+
uri: this.requestUri(req),
|
|
89
|
+
authorization: typeof auth === 'string' ? auth : undefined,
|
|
90
|
+
dpop: this.readProofHeader(req),
|
|
91
|
+
}, expectedJkt);
|
|
92
|
+
}
|
|
93
|
+
/** Validate DPoP for HTTP or WebSocket using an explicit context. */
|
|
94
|
+
async assertProofForAccessTokenContext(ctx, expectedJkt) {
|
|
95
|
+
const proof = ctx.dpop?.trim();
|
|
96
|
+
if (!proof) {
|
|
97
|
+
this.metrics?.recordBusinessEvent('auth', 'dpop_access', 'missing');
|
|
98
|
+
throw new common_1.UnauthorizedException('DPoP proof required for this access token');
|
|
99
|
+
}
|
|
100
|
+
const accessToken = typeof ctx.authorization === 'string' && ctx.authorization.startsWith('Bearer ')
|
|
101
|
+
? ctx.authorization.slice('Bearer '.length).trim()
|
|
102
|
+
: undefined;
|
|
103
|
+
const verified = await this.verifyProofContext(ctx, proof, accessToken);
|
|
104
|
+
if (verified.jkt !== expectedJkt) {
|
|
105
|
+
this.metrics?.recordBusinessEvent('auth', 'dpop_access', 'jkt_mismatch');
|
|
106
|
+
throw new common_1.UnauthorizedException('DPoP key thumbprint does not match access token');
|
|
107
|
+
}
|
|
108
|
+
await this.consumeJti(verified.jti);
|
|
109
|
+
this.metrics?.recordBusinessEvent('auth', 'dpop_access', 'success');
|
|
110
|
+
}
|
|
111
|
+
async verifyProofContext(ctx, proof, accessToken) {
|
|
112
|
+
try {
|
|
113
|
+
return await (0, dpop_util_1.verifyDpopProof)({
|
|
114
|
+
proof,
|
|
115
|
+
method: ctx.method,
|
|
116
|
+
uri: ctx.uri,
|
|
117
|
+
accessToken,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
catch (err) {
|
|
121
|
+
this.metrics?.recordBusinessEvent('auth', 'dpop_access', 'invalid');
|
|
122
|
+
throw new common_1.UnauthorizedException(err instanceof Error ? `Invalid DPoP proof: ${err.message}` : 'Invalid DPoP proof');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
readProofHeader(req) {
|
|
126
|
+
const raw = req.headers.dpop;
|
|
127
|
+
if (typeof raw === 'string' && raw.trim())
|
|
128
|
+
return raw.trim();
|
|
129
|
+
if (Array.isArray(raw) && typeof raw[0] === 'string')
|
|
130
|
+
return raw[0].trim();
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
requestUri(req) {
|
|
134
|
+
const host = req.get('host') || 'localhost';
|
|
135
|
+
const proto = (req.get('x-forwarded-proto') || req.protocol || 'http')
|
|
136
|
+
.split(',')[0]
|
|
137
|
+
.trim();
|
|
138
|
+
return `${proto}://${host}${req.originalUrl || req.url}`;
|
|
139
|
+
}
|
|
140
|
+
async consumeJti(jti) {
|
|
141
|
+
const key = `${KEY_DPOP_JTI}${jti}`;
|
|
142
|
+
const ok = await this.redis.set(key, '1', 'EX', 120, 'NX');
|
|
143
|
+
if (ok !== 'OK') {
|
|
144
|
+
this.metrics?.recordBusinessEvent('auth', 'dpop_access', 'replay');
|
|
145
|
+
throw new common_1.UnauthorizedException('DPoP proof replay detected');
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
exports.DpopService = DpopService;
|
|
150
|
+
exports.DpopService = DpopService = DpopService_1 = __decorate([
|
|
151
|
+
(0, common_1.Injectable)(),
|
|
152
|
+
__param(2, (0, common_1.Inject)(redis_module_1.REDIS_CLIENT)),
|
|
153
|
+
__param(3, (0, common_1.Optional)()),
|
|
154
|
+
__metadata("design:paramtypes", [settings_service_1.SettingsService,
|
|
155
|
+
config_1.ConfigService,
|
|
156
|
+
ioredis_1.default,
|
|
157
|
+
metrics_service_1.MetricsService])
|
|
158
|
+
], DpopService);
|
|
159
|
+
//# sourceMappingURL=dpop.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dpop.service.js","sourceRoot":"","sources":["../../../../src/modules/auth/services/dpop.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,2CAA+C;AAE/C,sDAA8B;AAE9B,iEAAoE;AACpE,+DAA4D;AAC5D,iFAA6E;AAC7E,0EAAsE;AACtE,+EAA2E;AAC3E,kDAAmF;AAEnF,MAAM,YAAY,GAAG,WAAW,CAAC;AAY1B,IAAM,WAAW,mBAAjB,MAAM,WAAW;IAIL;IACA;IAEA;IACY;IAPb,UAAU,GAAG,IAAI,eAAM,CAAC,aAAW,CAAC,IAAI,CAAC,CAAC;IAE3D,YACkB,eAAgC,EAChC,aAA4B,EAE5B,KAAc,EACF,OAAwB;QAJpC,oBAAe,GAAf,eAAe,CAAiB;QAChC,kBAAa,GAAb,a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