@colveor/core 1.1.0 → 1.2.1
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 +24 -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/1784284557959-full-schema.d.ts.map +1 -1
- package/dist/database/migrations/1784284557959-full-schema.js +48 -14
- package/dist/database/migrations/1784284557959-full-schema.js.map +1 -1
- package/dist/database/migrations/1784284557960-audit-partitioning.d.ts +17 -0
- package/dist/database/migrations/1784284557960-audit-partitioning.d.ts.map +1 -0
- package/dist/database/migrations/1784284557960-audit-partitioning.js +384 -0
- package/dist/database/migrations/1784284557960-audit-partitioning.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 +3 -0
- package/dist/modules/users/dto/user.dto.d.ts.map +1 -1
- package/dist/modules/users/dto/user.dto.js +27 -4
- 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
|
@@ -54,6 +54,8 @@ const argon2 = __importStar(require("argon2"));
|
|
|
54
54
|
const crypto_1 = require("crypto");
|
|
55
55
|
const ioredis_1 = __importDefault(require("ioredis"));
|
|
56
56
|
const redis_module_1 = require("../../../config/redis.module");
|
|
57
|
+
const audit_actions_1 = require("../../audit/constants/audit-actions");
|
|
58
|
+
const audit_service_1 = require("../../audit/services/audit.service");
|
|
57
59
|
const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
|
|
58
60
|
const metrics_service_1 = require("../../observability/metrics/metrics.service");
|
|
59
61
|
const token_service_1 = require("../../sessions/services/token.service");
|
|
@@ -65,6 +67,8 @@ const users_service_1 = require("../../users/services/users.service");
|
|
|
65
67
|
const auth_events_1 = require("../events/auth.events");
|
|
66
68
|
const auth_params_util_1 = require("../utils/auth-params.util");
|
|
67
69
|
const auth_supported_util_1 = require("../utils/auth-supported.util");
|
|
70
|
+
const mfa_service_1 = require("./mfa.service");
|
|
71
|
+
const oauth_service_1 = require("./oauth.service");
|
|
68
72
|
let LoginService = class LoginService {
|
|
69
73
|
usersService;
|
|
70
74
|
tokenService;
|
|
@@ -73,7 +77,10 @@ let LoginService = class LoginService {
|
|
|
73
77
|
eventEmitter;
|
|
74
78
|
logger;
|
|
75
79
|
metrics;
|
|
76
|
-
|
|
80
|
+
mfaService;
|
|
81
|
+
oauthService;
|
|
82
|
+
audit;
|
|
83
|
+
constructor(usersService, tokenService, redis, settingsService, eventEmitter = null, logger, metrics, mfaService, oauthService, audit) {
|
|
77
84
|
this.usersService = usersService;
|
|
78
85
|
this.tokenService = tokenService;
|
|
79
86
|
this.redis = redis;
|
|
@@ -81,8 +88,11 @@ let LoginService = class LoginService {
|
|
|
81
88
|
this.eventEmitter = eventEmitter;
|
|
82
89
|
this.logger = logger;
|
|
83
90
|
this.metrics = metrics;
|
|
91
|
+
this.mfaService = mfaService;
|
|
92
|
+
this.oauthService = oauthService;
|
|
93
|
+
this.audit = audit;
|
|
84
94
|
}
|
|
85
|
-
async login(dto, deviceInfo, ipAddress) {
|
|
95
|
+
async login(dto, deviceInfo, ipAddress, dpopJkt) {
|
|
86
96
|
const mode = (0, auth_params_util_1.resolveAuthParamsMode)(dto);
|
|
87
97
|
if (mode === 'ambiguous' || mode === 'missing') {
|
|
88
98
|
throw new common_1.BadRequestException(auth_params_util_1.AUTH_PARAMS_ERROR);
|
|
@@ -90,42 +100,77 @@ let LoginService = class LoginService {
|
|
|
90
100
|
const supported = (0, auth_supported_util_1.parseSupportedAuthMethods)(this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_SUPPORTED_LOGIN_METHODS));
|
|
91
101
|
(0, auth_supported_util_1.assertSupportedAuthMethod)(mode, supported, 'login');
|
|
92
102
|
if ((0, auth_params_util_1.isPhoneAuthParams)(dto)) {
|
|
93
|
-
return this.loginWithPhone(dto.verificationToken, deviceInfo, ipAddress);
|
|
103
|
+
return this.loginWithPhone(dto.verificationToken, deviceInfo, ipAddress, dpopJkt);
|
|
94
104
|
}
|
|
95
105
|
if ((0, auth_params_util_1.isEmailAuthParams)(dto)) {
|
|
96
|
-
return this.loginWithEmail(dto.email, dto.password, deviceInfo, ipAddress);
|
|
106
|
+
return this.loginWithEmail(dto.email, dto.password, deviceInfo, ipAddress, dpopJkt);
|
|
107
|
+
}
|
|
108
|
+
if ((0, auth_params_util_1.isOAuthAuthParams)(dto)) {
|
|
109
|
+
return this.loginWithOAuth(dto.provider, dto.idToken, deviceInfo, ipAddress, dto.nonce, dpopJkt);
|
|
97
110
|
}
|
|
98
111
|
throw new common_1.BadRequestException(auth_params_util_1.AUTH_PARAMS_ERROR);
|
|
99
112
|
}
|
|
100
113
|
/**
|
|
101
114
|
* Issues tokens after phone OTP verification (verify-otp bridge token).
|
|
102
115
|
*/
|
|
103
|
-
async loginWithPhoneVerificationToken(verificationToken, deviceInfo, ipAddress) {
|
|
104
|
-
return this.loginWithPhone(verificationToken, deviceInfo, ipAddress);
|
|
116
|
+
async loginWithPhoneVerificationToken(verificationToken, deviceInfo, ipAddress, dpopJkt) {
|
|
117
|
+
return this.loginWithPhone(verificationToken, deviceInfo, ipAddress, dpopJkt);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Continue after a verified first factor (shared by test-login email path).
|
|
121
|
+
* Applies MFA challenge when required.
|
|
122
|
+
*/
|
|
123
|
+
async continueAfterFirstFactor(user, method, deviceInfo, ipAddress, opts) {
|
|
124
|
+
return this.finishAfterFirstFactor(user, method, deviceInfo, ipAddress, opts);
|
|
105
125
|
}
|
|
106
126
|
/**
|
|
107
|
-
* Issues tokens for a verified user (shared by phone login and
|
|
127
|
+
* Issues tokens for a verified user (shared by phone login, MFA verify, and OAuth).
|
|
108
128
|
*/
|
|
109
|
-
async completeLoginForUser(user, method, deviceInfo, ipAddress) {
|
|
129
|
+
async completeLoginForUser(user, method, deviceInfo, ipAddress, opts) {
|
|
110
130
|
this.assertLoginMethodSupported(method);
|
|
111
131
|
this.assertAccountActive(user, method, ipAddress, deviceInfo);
|
|
112
|
-
|
|
113
|
-
|
|
132
|
+
if (!opts?.skipAuthMethodCheck) {
|
|
133
|
+
this.assertAuthMethod(user, method, ipAddress, deviceInfo);
|
|
134
|
+
}
|
|
114
135
|
const tokens = await this.tokenService.generateTokens({
|
|
115
136
|
user: user_dto_1.UserResponseDto.fromUser(user),
|
|
116
137
|
roles: user.roles?.map((role) => role.slug) ?? [],
|
|
117
138
|
ipAddress,
|
|
118
139
|
deviceInfo,
|
|
140
|
+
dpopJkt: opts?.dpopJkt,
|
|
119
141
|
});
|
|
142
|
+
// Throttled bookkeeping — avoid hot-row churn under high login QPS.
|
|
143
|
+
const minInterval = this.settingsService.get(settings_keys_1.SETTING_KEYS.LOGIN_LAST_LOGIN_MIN_INTERVAL_SECONDS);
|
|
144
|
+
const shouldUpdateLastLogin = !minInterval ||
|
|
145
|
+
minInterval <= 0 ||
|
|
146
|
+
!user.lastLoginAt ||
|
|
147
|
+
Date.now() - user.lastLoginAt.getTime() >= minInterval * 1000;
|
|
148
|
+
if (shouldUpdateLastLogin) {
|
|
149
|
+
void Promise.resolve(this.usersService.updateLastLogin(user.id)).catch((err) => {
|
|
150
|
+
this.logger.warn('Failed to update last login', {
|
|
151
|
+
event: 'auth.login.last_login_update_failed',
|
|
152
|
+
metadata: { userId: user.id },
|
|
153
|
+
err: err instanceof Error ? err : undefined,
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
}
|
|
120
157
|
this.logSuccess({ userId: user.id, method, ipAddress, deviceInfo });
|
|
121
|
-
await this.emitLoginCompleted({
|
|
158
|
+
await this.emitLoginCompleted({
|
|
159
|
+
user,
|
|
160
|
+
method,
|
|
161
|
+
ipAddress,
|
|
162
|
+
deviceInfo,
|
|
163
|
+
mfaUsed: opts?.mfaUsed === true,
|
|
164
|
+
amr: opts?.amr ?? [method],
|
|
165
|
+
oauthProvider: opts?.oauthProvider,
|
|
166
|
+
});
|
|
122
167
|
return tokens;
|
|
123
168
|
}
|
|
124
169
|
// ─── Phone ────────────────────────────────────────────────────────────────
|
|
125
|
-
async loginWithPhone(token, deviceInfo, ipAddress) {
|
|
170
|
+
async loginWithPhone(token, deviceInfo, ipAddress, dpopJkt) {
|
|
126
171
|
const userId = await this.tokenService.verifyTemporaryToken(token).catch(() => {
|
|
127
172
|
this.logFailure({
|
|
128
|
-
method:
|
|
173
|
+
method: user_entity_1.UserAuthMethod.PHONE,
|
|
129
174
|
reason: 'invalid_credentials',
|
|
130
175
|
ipAddress,
|
|
131
176
|
deviceInfo,
|
|
@@ -135,7 +180,7 @@ let LoginService = class LoginService {
|
|
|
135
180
|
const user = await this.usersService.findById(userId);
|
|
136
181
|
if (!user) {
|
|
137
182
|
this.logFailure({
|
|
138
|
-
method:
|
|
183
|
+
method: user_entity_1.UserAuthMethod.PHONE,
|
|
139
184
|
reason: 'user_not_found',
|
|
140
185
|
identity: userId,
|
|
141
186
|
ipAddress,
|
|
@@ -143,15 +188,17 @@ let LoginService = class LoginService {
|
|
|
143
188
|
});
|
|
144
189
|
throw new common_1.UnauthorizedException('User not found');
|
|
145
190
|
}
|
|
146
|
-
return this.
|
|
191
|
+
return this.finishAfterFirstFactor(user, user_entity_1.UserAuthMethod.PHONE, deviceInfo, ipAddress, {
|
|
192
|
+
dpopJkt,
|
|
193
|
+
});
|
|
147
194
|
}
|
|
148
195
|
// ─── Email ────────────────────────────────────────────────────────────────
|
|
149
|
-
async loginWithEmail(email, password, deviceInfo, ipAddress) {
|
|
196
|
+
async loginWithEmail(email, password, deviceInfo, ipAddress, dpopJkt) {
|
|
150
197
|
await this.checkIdentifierLockout(email);
|
|
151
198
|
const user = await this.verifyEmailCredentials(email, password).catch(async (err) => {
|
|
152
199
|
await this.recordFailedAttempt(email);
|
|
153
200
|
this.logFailure({
|
|
154
|
-
method:
|
|
201
|
+
method: user_entity_1.UserAuthMethod.EMAIL,
|
|
155
202
|
reason: 'invalid_credentials',
|
|
156
203
|
identity: email,
|
|
157
204
|
ipAddress,
|
|
@@ -160,7 +207,53 @@ let LoginService = class LoginService {
|
|
|
160
207
|
throw err;
|
|
161
208
|
});
|
|
162
209
|
await this.resetFailedAttempts(email);
|
|
163
|
-
|
|
210
|
+
// Password may be an additional factor on OAuth/phone accounts (authMethod unchanged).
|
|
211
|
+
return this.finishAfterFirstFactor(user, user_entity_1.UserAuthMethod.EMAIL, deviceInfo, ipAddress, {
|
|
212
|
+
skipAuthMethodCheck: user.authMethod !== user_entity_1.UserAuthMethod.EMAIL,
|
|
213
|
+
dpopJkt,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
// ─── OAuth ────────────────────────────────────────────────────────────────
|
|
217
|
+
async loginWithOAuth(provider, idToken, deviceInfo, ipAddress, nonce, dpopJkt) {
|
|
218
|
+
const resolved = await this.oauthService.resolveLoginUser(provider, idToken, {
|
|
219
|
+
nonce,
|
|
220
|
+
});
|
|
221
|
+
return this.finishAfterFirstFactor(resolved.user, user_entity_1.UserAuthMethod.OAUTH, deviceInfo, ipAddress, {
|
|
222
|
+
// Linked Google on an email/phone account: first factor is OAuth, primary method differs.
|
|
223
|
+
skipAuthMethodCheck: resolved.linkedIdentity,
|
|
224
|
+
provider: resolved.provider,
|
|
225
|
+
dpopJkt,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
async finishAfterFirstFactor(user, method, deviceInfo, ipAddress, opts) {
|
|
229
|
+
this.assertLoginMethodSupported(method);
|
|
230
|
+
this.assertAccountActive(user, method, ipAddress, deviceInfo);
|
|
231
|
+
if (!opts?.skipAuthMethodCheck) {
|
|
232
|
+
this.assertAuthMethod(user, method, ipAddress, deviceInfo);
|
|
233
|
+
}
|
|
234
|
+
if (method === user_entity_1.UserAuthMethod.EMAIL &&
|
|
235
|
+
this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_EMAIL_REQUIRE_VERIFIED_TO_LOGIN) ===
|
|
236
|
+
true &&
|
|
237
|
+
!user.isEmailVerified) {
|
|
238
|
+
this.logFailure({
|
|
239
|
+
method,
|
|
240
|
+
reason: 'email_unverified',
|
|
241
|
+
identity: user.id,
|
|
242
|
+
ipAddress,
|
|
243
|
+
deviceInfo,
|
|
244
|
+
});
|
|
245
|
+
throw new common_1.UnauthorizedException('Email address must be verified before signing in. Complete POST /auth/verify-email first.');
|
|
246
|
+
}
|
|
247
|
+
const challenge = await this.mfaService.issueChallengeIfRequired(user, method, opts?.provider);
|
|
248
|
+
if (challenge)
|
|
249
|
+
return challenge;
|
|
250
|
+
return this.completeLoginForUser(user, method, deviceInfo, ipAddress, {
|
|
251
|
+
skipAuthMethodCheck: true, // already checked above
|
|
252
|
+
mfaUsed: false,
|
|
253
|
+
amr: [method],
|
|
254
|
+
oauthProvider: opts?.provider,
|
|
255
|
+
dpopJkt: opts?.dpopJkt,
|
|
256
|
+
});
|
|
164
257
|
}
|
|
165
258
|
async verifyEmailCredentials(email, password) {
|
|
166
259
|
const user = await this.usersService.findByEmailWithPassword(email);
|
|
@@ -175,12 +268,6 @@ let LoginService = class LoginService {
|
|
|
175
268
|
return user;
|
|
176
269
|
}
|
|
177
270
|
// ─── Lifecycle hooks ────────────────────────────────────────────────────────
|
|
178
|
-
/**
|
|
179
|
-
* Emits {@link AUTH_EVENTS.LOGIN_COMPLETED} for consuming apps to react to
|
|
180
|
-
* (e.g. call another service). Fire-and-forget: a failing or slow listener is
|
|
181
|
-
* logged and never breaks the login response. No-op if the event bus is absent
|
|
182
|
-
* (e.g. in isolated unit tests that don't import EventEmitterModule).
|
|
183
|
-
*/
|
|
184
271
|
async emitLoginCompleted(args) {
|
|
185
272
|
if (!this.eventEmitter)
|
|
186
273
|
return;
|
|
@@ -189,30 +276,27 @@ let LoginService = class LoginService {
|
|
|
189
276
|
user: user_dto_1.UserResponseDto.fromUser(args.user),
|
|
190
277
|
roles: args.user.roles?.map((role) => role.slug) ?? [],
|
|
191
278
|
method: args.method,
|
|
279
|
+
amr: args.amr,
|
|
280
|
+
mfaUsed: args.mfaUsed,
|
|
281
|
+
oauthProvider: args.oauthProvider,
|
|
192
282
|
ipAddress: args.ipAddress,
|
|
193
283
|
deviceInfo: args.deviceInfo,
|
|
194
284
|
at: new Date(),
|
|
195
285
|
};
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
catch (err) {
|
|
286
|
+
// Fire-and-forget: never block the login hot path on listener latency.
|
|
287
|
+
void this.eventEmitter.emitAsync(auth_events_1.AUTH_EVENTS.LOGIN_COMPLETED, payload).catch((err) => {
|
|
200
288
|
this.logger.error('Auth login event listener failed', {
|
|
201
289
|
event: 'auth.login.event_failed',
|
|
202
290
|
metadata: { listener: auth_events_1.AUTH_EVENTS.LOGIN_COMPLETED },
|
|
203
291
|
err: err instanceof Error ? err : undefined,
|
|
204
292
|
});
|
|
205
|
-
}
|
|
293
|
+
});
|
|
206
294
|
}
|
|
207
295
|
// ─── Guards ───────────────────────────────────────────────────────────────
|
|
208
296
|
assertLoginMethodSupported(method) {
|
|
209
297
|
const supported = (0, auth_supported_util_1.parseSupportedAuthMethods)(this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_SUPPORTED_LOGIN_METHODS));
|
|
210
298
|
(0, auth_supported_util_1.assertSupportedAuthMethod)(method, supported, 'login');
|
|
211
299
|
}
|
|
212
|
-
/**
|
|
213
|
-
* Throws UnauthorizedException if the account is not allowed to log in.
|
|
214
|
-
* Pure validation — no side effects.
|
|
215
|
-
*/
|
|
216
300
|
assertAccountActive(user, method, ipAddress, deviceInfo) {
|
|
217
301
|
if (!user.isActive ||
|
|
218
302
|
user.status === user_entity_1.UserStatus.SUSPENDED ||
|
|
@@ -249,7 +333,9 @@ let LoginService = class LoginService {
|
|
|
249
333
|
});
|
|
250
334
|
const expected = user.authMethod === user_entity_1.UserAuthMethod.PHONE
|
|
251
335
|
? 'phone OTP authentication'
|
|
252
|
-
:
|
|
336
|
+
: user.authMethod === user_entity_1.UserAuthMethod.OAUTH
|
|
337
|
+
? 'OAuth authentication'
|
|
338
|
+
: 'email and password authentication';
|
|
253
339
|
throw new common_1.UnauthorizedException(`This account uses ${expected}. Please sign in with the correct method.`);
|
|
254
340
|
}
|
|
255
341
|
// ─── Audit Logging ────────────────────────────────────────────────────────
|
|
@@ -275,50 +361,72 @@ let LoginService = class LoginService {
|
|
|
275
361
|
deviceInfo: args.deviceInfo,
|
|
276
362
|
},
|
|
277
363
|
});
|
|
364
|
+
const identityHash = args.identity
|
|
365
|
+
? (0, crypto_1.createHash)('sha256')
|
|
366
|
+
.update(args.identity.trim().toLowerCase())
|
|
367
|
+
.digest('hex')
|
|
368
|
+
.slice(0, 16)
|
|
369
|
+
: undefined;
|
|
370
|
+
if (this.eventEmitter) {
|
|
371
|
+
const payload = {
|
|
372
|
+
method: args.method,
|
|
373
|
+
reason: args.reason,
|
|
374
|
+
identityHash,
|
|
375
|
+
ipAddress: args.ipAddress,
|
|
376
|
+
deviceInfo: args.deviceInfo,
|
|
377
|
+
at: new Date(),
|
|
378
|
+
};
|
|
379
|
+
void this.eventEmitter.emitAsync(auth_events_1.AUTH_EVENTS.LOGIN_FAILED, payload).catch(() => {
|
|
380
|
+
/* audit listener failures must not affect login response */
|
|
381
|
+
});
|
|
382
|
+
}
|
|
278
383
|
}
|
|
279
|
-
/**
|
|
280
|
-
* Full SHA-256 hash for Redis security keys.
|
|
281
|
-
* Not truncated — no reason to reduce the key space for a lockout store.
|
|
282
|
-
*/
|
|
283
384
|
lockoutKey(identifier) {
|
|
284
385
|
return `login:lockout:${(0, crypto_1.createHash)('sha256').update(identifier).digest('hex')}`;
|
|
285
386
|
}
|
|
286
|
-
// ─── Per-identifier lockout (email/password only) ─────────────────────────
|
|
287
|
-
/**
|
|
288
|
-
* Throws 429 if the identifier has exceeded the max failed-attempt threshold.
|
|
289
|
-
* Fail-open when Redis is unavailable.
|
|
290
|
-
*/
|
|
291
387
|
async checkIdentifierLockout(identifier) {
|
|
292
388
|
const key = this.lockoutKey(identifier);
|
|
293
|
-
const count = await this.redis.get(key);
|
|
294
|
-
if (!count)
|
|
295
|
-
return;
|
|
296
389
|
const max = this.settingsService.get(settings_keys_1.SETTING_KEYS.LOGIN_LOCKOUT_MAX_ATTEMPTS);
|
|
297
|
-
|
|
298
|
-
|
|
390
|
+
// One round-trip: GET count + TTL when locked.
|
|
391
|
+
const [count, ttl] = (await this.redis.eval(`local c = redis.call('GET', KEYS[1])
|
|
392
|
+
if not c then return {0, -2} end
|
|
393
|
+
local n = tonumber(c)
|
|
394
|
+
if n >= tonumber(ARGV[1]) then
|
|
395
|
+
return {n, redis.call('TTL', KEYS[1])}
|
|
396
|
+
end
|
|
397
|
+
return {n, -1}`, 1, key, String(max)));
|
|
398
|
+
if (count >= max) {
|
|
299
399
|
throw new common_1.HttpException({
|
|
300
400
|
message: `Too many failed login attempts. Please try again in ${ttl}s.`,
|
|
301
401
|
retryAfter: ttl,
|
|
302
402
|
}, common_1.HttpStatus.TOO_MANY_REQUESTS);
|
|
303
403
|
}
|
|
304
404
|
}
|
|
305
|
-
/**
|
|
306
|
-
* Increments the failed-attempt counter for an identifier.
|
|
307
|
-
* Sets a TTL on first increment; subsequent increments preserve the existing TTL
|
|
308
|
-
* so the window doesn't reset on every failure.
|
|
309
|
-
* Fail-silent when Redis is unavailable.
|
|
310
|
-
*/
|
|
311
405
|
async recordFailedAttempt(identifier) {
|
|
312
406
|
const duration = this.settingsService.get(settings_keys_1.SETTING_KEYS.LOGIN_LOCKOUT_DURATION_SECONDS);
|
|
407
|
+
const max = this.settingsService.get(settings_keys_1.SETTING_KEYS.LOGIN_LOCKOUT_MAX_ATTEMPTS);
|
|
313
408
|
const key = this.lockoutKey(identifier);
|
|
314
|
-
await this.redis.eval(`local n = redis.call('INCR', KEYS[1])
|
|
409
|
+
const count = Number(await this.redis.eval(`local n = redis.call('INCR', KEYS[1])
|
|
315
410
|
if n == 1 then redis.call('EXPIRE', KEYS[1], ARGV[1]) end
|
|
316
|
-
return n`, 1, key, String(duration));
|
|
411
|
+
return n`, 1, key, String(duration)));
|
|
412
|
+
if (Number.isFinite(count) && count === max) {
|
|
413
|
+
this.audit.record({
|
|
414
|
+
action: audit_actions_1.AUDIT_ACTIONS.LOGIN_LOCKED,
|
|
415
|
+
actorType: 'USER',
|
|
416
|
+
actorId: null,
|
|
417
|
+
resourceType: 'auth',
|
|
418
|
+
status: 'FAILURE',
|
|
419
|
+
metadata: {
|
|
420
|
+
identityHash: (0, crypto_1.createHash)('sha256')
|
|
421
|
+
.update(identifier.trim().toLowerCase())
|
|
422
|
+
.digest('hex')
|
|
423
|
+
.slice(0, 16),
|
|
424
|
+
attempts: count,
|
|
425
|
+
lockoutSeconds: duration,
|
|
426
|
+
},
|
|
427
|
+
});
|
|
428
|
+
}
|
|
317
429
|
}
|
|
318
|
-
/**
|
|
319
|
-
* Clears the failed-attempt counter after a successful login.
|
|
320
|
-
* Fail-silent when Redis is unavailable.
|
|
321
|
-
*/
|
|
322
430
|
async resetFailedAttempts(identifier) {
|
|
323
431
|
await this.redis.del(this.lockoutKey(identifier));
|
|
324
432
|
}
|
|
@@ -328,10 +436,14 @@ exports.LoginService = LoginService = __decorate([
|
|
|
328
436
|
(0, common_1.Injectable)(),
|
|
329
437
|
__param(2, (0, common_1.Inject)(redis_module_1.REDIS_CLIENT)),
|
|
330
438
|
__param(4, (0, common_1.Optional)()),
|
|
439
|
+
__param(7, (0, common_1.Inject)((0, common_1.forwardRef)(() => mfa_service_1.MfaService))),
|
|
331
440
|
__metadata("design:paramtypes", [users_service_1.UsersService,
|
|
332
441
|
token_service_1.TokenService,
|
|
333
442
|
ioredis_1.default,
|
|
334
443
|
settings_service_1.SettingsService, Object, structured_logger_service_1.StructuredLoggerService,
|
|
335
|
-
metrics_service_1.MetricsService
|
|
444
|
+
metrics_service_1.MetricsService,
|
|
445
|
+
mfa_service_1.MfaService,
|
|
446
|
+
oauth_service_1.OAuthService,
|
|
447
|
+
audit_service_1.AuditService])
|
|
336
448
|
], LoginService);
|
|
337
449
|
//# sourceMappingURL=login.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.service.js","sourceRoot":"","sources":["../../../../src/modules/auth/services/login.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAQwB;AAExB,+CAAiC;AACjC,mCAAoC;AACpC,sDAA8B;AAE9B,+DAA4D;AAC5D,qGAAgG;AAChG,iFAA6E;AAC7E,yEAAqE;AACrE,0EAAsE;AACtE,+EAA2E;AAC3E,uDAA2D;AAC3D,kEAAoF;AACpF,sEAAkE;AAGlE,uDAAyF;AACzF,gEAKmC;AACnC,sEAAoG;AAG7F,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEN;IACA;IAEA;IACA;IAEA;IACA;IACA;IATlB,YACkB,YAA0B,EAC1B,YAA0B,EAE1B,KAAc,EACd,eAAgC,EAEhC,eAAqC,IAAI,EACzC,MAA+B,EAC/B,OAAuB;QARvB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,iBAAY,GAAZ,YAAY,CAAc;QAE1B,UAAK,GAAL,KAAK,CAAS;QACd,oBAAe,GAAf,eAAe,CAAiB;QAEhC,iBAAY,GAAZ,YAAY,CAA6B;QACzC,WAAM,GAAN,MAAM,CAAyB;QAC/B,YAAO,GAAP,OAAO,CAAgB;IACtC,CAAC;IAEJ,KAAK,CAAC,KAAK,CAAC,GAAa,EAAE,UAAmB,EAAE,SAAkB;QACjE,MAAM,I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GAAE;IAKV,WAAA,IAAA,eAAM,EAAC,2BAAY,CAAC,CAAA;IAGpB,WAAA,IAAA,iBAAQ,GAAE,CAAA;qCALoB,4BAAY;QACZ,4BAAY;QAEnB,iBAAO;QACG,kCAAe,UAGxB,mDAAuB;QACtB,gCAAc;GAV7B,YAAY,CA6WxB"}
|
|
1
|
+
{"version":3,"file":"login.service.js","sourceRoot":"","sources":["../../../../src/modules/auth/services/login.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CASwB;AAExB,+CAAiC;AACjC,mCAAoC;AACpC,sDAA8B;AAE9B,+DAA4D;AAC5D,uEAAoE;AACpE,sEAAkE;AAClE,qGAAgG;AAChG,iFAA6E;AAC7E,yEAAqE;AACrE,0EAAsE;AACtE,+EAA2E;AAC3E,uDAA2D;AAC3D,kEAAoF;AACpF,sEAAkE;AAGlE,uDAK+B;AAC/B,gEAMmC;AACnC,sEAAoG;AACpG,+CAA2C;AAC3C,mDAA+C;AAGxC,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEN;IACA;IAEA;IACA;IAEA;IACA;IACA;IAEA;IACA;IACA;IAblB,YACkB,YAA0B,EAC1B,YAA0B,EAE1B,KAAc,EACd,eAAgC,EAEhC,eAAqC,IAAI,EACzC,MAA+B,EAC/B,OAAuB,EAEvB,UAAsB,EACtB,YAA0B,EAC1B,KAAmB;QAZnB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,iBAAY,GAAZ,YAAY,CAAc;QAE1B,UAAK,GAAL,KAAK,CAAS;QACd,oBAAe,GAAf,eAAe,CAAiB;QAEhC,iBAAY,GAAZ,YAAY,CAA6B;QACzC,WAAM,GAAN,MAAM,CAAyB;QAC/B,YAAO,GAAP,OAAO,CAAgB;QAEvB,eAAU,GAAV,UAAU,CAAY;QACtB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,UAAK,GAAL,KAAK,CAAc;IAClC,CAAC;IAEJ,KA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EAAC,2BAAY,CAAC,CAAA;IAGpB,WAAA,IAAA,iBAAQ,GAAE,CAAA;IAIV,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC,CAAC,CAAA;qCATN,4BAAY;QACZ,4BAAY;QAEnB,iBAAO;QACG,kCAAe,UAGxB,mDAAuB;QACtB,gCAAc;QAEX,wBAAU;QACR,4BAAY;QACnB,4BAAY;GAdzB,YAAY,CAgiBxB"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { EventEmitter2 } from '@nestjs/event-emitter';
|
|
3
|
+
import IORedis from 'ioredis';
|
|
4
|
+
import { DataSource, Repository } from 'typeorm';
|
|
5
|
+
import { AuditService } from '../../audit/services/audit.service';
|
|
6
|
+
import { StructuredLoggerService } from '../../observability/logging/structured-logger.service';
|
|
7
|
+
import { MetricsService } from '../../observability/metrics/metrics.service';
|
|
8
|
+
import { TokenService } from '../../sessions/services/token.service';
|
|
9
|
+
import { SettingsService } from '../../settings/services/settings.service';
|
|
10
|
+
import { User } from '../../users/entities/user.entity';
|
|
11
|
+
import { UsersService } from '../../users/services/users.service';
|
|
12
|
+
import { MfaBackupCodesResponseDto, MfaDisableDto, MfaStatusResponseDto, MfaStepUpDto, MfaStepUpResponseDto, MfaTotpConfirmDto, MfaTotpConfirmResponseDto, MfaTotpSetupResponseDto, MfaVerifyDto } from '../dto/mfa.dto';
|
|
13
|
+
import { MfaChallengeResponse, TokenResponse } from '../dto/token.dto';
|
|
14
|
+
import { UserMfa } from '../entities/user-mfa.entity';
|
|
15
|
+
import { OAuthProvider } from '../entities/user-oauth-identity.entity';
|
|
16
|
+
import type { StepUpPurpose } from '../utils/step-up-purpose.util';
|
|
17
|
+
import { LoginService } from './login.service';
|
|
18
|
+
import { OAuthService } from './oauth.service';
|
|
19
|
+
import { OtpAuthService } from './otp-auth.service';
|
|
20
|
+
/** Proof of possession for sensitive account actions. */
|
|
21
|
+
export type SensitiveReauthOpts = {
|
|
22
|
+
purpose: StepUpPurpose;
|
|
23
|
+
stepUpToken?: string;
|
|
24
|
+
password?: string;
|
|
25
|
+
verificationId?: string;
|
|
26
|
+
otp?: string;
|
|
27
|
+
provider?: OAuthProvider;
|
|
28
|
+
idToken?: string;
|
|
29
|
+
};
|
|
30
|
+
export declare class MfaService {
|
|
31
|
+
private readonly mfaRepo;
|
|
32
|
+
private readonly usersService;
|
|
33
|
+
private readonly tokenService;
|
|
34
|
+
private readonly loginService;
|
|
35
|
+
private readonly settingsService;
|
|
36
|
+
private readonly configService;
|
|
37
|
+
private readonly redis;
|
|
38
|
+
private readonly logger;
|
|
39
|
+
private readonly metrics;
|
|
40
|
+
private readonly dataSource;
|
|
41
|
+
private readonly otpAuthService;
|
|
42
|
+
private readonly oauthService;
|
|
43
|
+
private readonly audit;
|
|
44
|
+
private readonly eventEmitter;
|
|
45
|
+
constructor(mfaRepo: Repository<UserMfa>, usersService: UsersService, tokenService: TokenService, loginService: LoginService, settingsService: SettingsService, configService: ConfigService, redis: IORedis, logger: StructuredLoggerService, metrics: MetricsService, dataSource: DataSource, otpAuthService: OtpAuthService, oauthService: OAuthService, audit: AuditService, eventEmitter?: EventEmitter2 | null);
|
|
46
|
+
getStatus(userId: string): Promise<MfaStatusResponseDto>;
|
|
47
|
+
/**
|
|
48
|
+
* Whether this user must complete MFA before session tokens are issued.
|
|
49
|
+
* Prefer {@link issueChallengeIfRequired} on the login hot path (one query + token).
|
|
50
|
+
*/
|
|
51
|
+
requiresMfa(user: User, _firstFactor: 'phone' | 'email' | 'oauth'): Promise<boolean>;
|
|
52
|
+
/**
|
|
53
|
+
* Single-query MFA gate for login: returns a challenge response or null.
|
|
54
|
+
* Loads backup-code availability in the same round-trip.
|
|
55
|
+
* Enrolled MFA always challenges (ignore required_for_methods allowlist).
|
|
56
|
+
*/
|
|
57
|
+
issueChallengeIfRequired(user: User, amr: 'phone' | 'email' | 'oauth', provider?: string): Promise<MfaChallengeResponse | null>;
|
|
58
|
+
beginChallenge(user: User, amr: 'phone' | 'email' | 'oauth', provider?: string): Promise<MfaChallengeResponse>;
|
|
59
|
+
setupTotp(userId: string): Promise<MfaTotpSetupResponseDto>;
|
|
60
|
+
confirmTotp(userId: string, dto: MfaTotpConfirmDto): Promise<MfaTotpConfirmResponseDto>;
|
|
61
|
+
regenerateBackupCodes(userId: string, dto: MfaDisableDto): Promise<MfaBackupCodesResponseDto>;
|
|
62
|
+
disable(userId: string, dto: MfaDisableDto): Promise<MfaStatusResponseDto>;
|
|
63
|
+
/**
|
|
64
|
+
* Re-auth before enabling MFA (stolen-session cannot enroll attacker TOTP).
|
|
65
|
+
* Password → phone OTP → linked OAuth ID token.
|
|
66
|
+
*/
|
|
67
|
+
private assertEnrollmentReauth;
|
|
68
|
+
/**
|
|
69
|
+
* Sensitive actions: never silent-pass.
|
|
70
|
+
* MFA enrolled → purpose-scoped step-up; otherwise first-factor proof (password / phone OTP / OAuth).
|
|
71
|
+
*/
|
|
72
|
+
assertSensitiveReauth(userId: string, opts: SensitiveReauthOpts): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* When the user has MFA enrolled, require and consume a purpose-scoped step-up token.
|
|
75
|
+
* No-op when MFA is disabled — callers that need always-on re-auth should use
|
|
76
|
+
* {@link assertSensitiveReauth} instead.
|
|
77
|
+
*/
|
|
78
|
+
consumeStepUpIfRequired(userId: string, stepUpToken: string | undefined, purpose: StepUpPurpose): Promise<void>;
|
|
79
|
+
/** First-factor proof when MFA is off (never silent-pass). */
|
|
80
|
+
private assertFirstFactorReauth;
|
|
81
|
+
verifyChallenge(dto: MfaVerifyDto, deviceInfo?: string, ipAddress?: string, dpopJkt?: string): Promise<TokenResponse>;
|
|
82
|
+
/**
|
|
83
|
+
* Authenticated step-up: confirm MFA again and receive a short-lived elevated token.
|
|
84
|
+
*/
|
|
85
|
+
stepUp(userId: string, dto: MfaStepUpDto): Promise<MfaStepUpResponseDto>;
|
|
86
|
+
private issueBackupCodes;
|
|
87
|
+
/**
|
|
88
|
+
* Verify backup codes outside the DB lock, then claim under a short
|
|
89
|
+
* pessimistic lock by matching the stored hash string.
|
|
90
|
+
*/
|
|
91
|
+
private consumeBackupCode;
|
|
92
|
+
/** Avoid a no-op MFA row write when lockout fields are already clear. */
|
|
93
|
+
private clearMfaLockoutIfNeeded;
|
|
94
|
+
private toStatus;
|
|
95
|
+
private loadMfaWithSecrets;
|
|
96
|
+
private assertNotLocked;
|
|
97
|
+
/** Increment failed attempts under a row lock so concurrent wrong codes cannot under-count. */
|
|
98
|
+
private recordFailedAttempt;
|
|
99
|
+
private assertTotpNotReplayed;
|
|
100
|
+
private clearTotpReplay;
|
|
101
|
+
/**
|
|
102
|
+
* Prefer dedicated MFA_ENCRYPTION_KEY; fall back to ENCRYPTION_KEY.
|
|
103
|
+
* Backup-code HMAC pepper uses the same material.
|
|
104
|
+
*/
|
|
105
|
+
private requireMfaEncryptionKey;
|
|
106
|
+
private previousMfaEncryptionKey;
|
|
107
|
+
private mfaPeppers;
|
|
108
|
+
private decryptTotpSecret;
|
|
109
|
+
private emitMfaEvent;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=mfa.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mfa.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/services/mfa.service.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIjD,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C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