@udhuong/admin-core 0.1.1 → 0.1.3
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/dist/server/admin-core-options.interface.d.ts +53 -0
- package/dist/server/admin-core-options.interface.d.ts.map +1 -0
- package/dist/server/admin-core-options.interface.js +5 -0
- package/dist/server/admin-core-options.interface.js.map +1 -0
- package/dist/server/admin-core.module.d.ts +8 -0
- package/dist/server/admin-core.module.d.ts.map +1 -0
- package/dist/server/admin-core.module.js +292 -0
- package/dist/server/admin-core.module.js.map +1 -0
- package/dist/server/auth/application/actions/auth/change-password.action.d.ts +12 -0
- package/dist/server/auth/application/actions/auth/change-password.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/change-password.action.js +56 -0
- package/dist/server/auth/application/actions/auth/change-password.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/client-credentials.action.d.ts +16 -0
- package/dist/server/auth/application/actions/auth/client-credentials.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/client-credentials.action.js +101 -0
- package/dist/server/auth/application/actions/auth/client-credentials.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/forgot-password.action.d.ts +12 -0
- package/dist/server/auth/application/actions/auth/forgot-password.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/forgot-password.action.js +50 -0
- package/dist/server/auth/application/actions/auth/forgot-password.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/get-roles-permissions.action.d.ts +13 -0
- package/dist/server/auth/application/actions/auth/get-roles-permissions.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/get-roles-permissions.action.js +53 -0
- package/dist/server/auth/application/actions/auth/get-roles-permissions.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/get-user-profile.action.d.ts +10 -0
- package/dist/server/auth/application/actions/auth/get-user-profile.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/get-user-profile.action.js +43 -0
- package/dist/server/auth/application/actions/auth/get-user-profile.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/index.d.ts +14 -0
- package/dist/server/auth/application/actions/auth/index.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/index.js +30 -0
- package/dist/server/auth/application/actions/auth/index.js.map +1 -0
- package/dist/server/auth/application/actions/auth/login.action.d.ts +23 -0
- package/dist/server/auth/application/actions/auth/login.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/login.action.js +175 -0
- package/dist/server/auth/application/actions/auth/login.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/logout.action.d.ts +8 -0
- package/dist/server/auth/application/actions/auth/logout.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/logout.action.js +48 -0
- package/dist/server/auth/application/actions/auth/logout.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/refresh-token.action.d.ts +24 -0
- package/dist/server/auth/application/actions/auth/refresh-token.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/refresh-token.action.js +165 -0
- package/dist/server/auth/application/actions/auth/refresh-token.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/register.action.d.ts +16 -0
- package/dist/server/auth/application/actions/auth/register.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/register.action.js +83 -0
- package/dist/server/auth/application/actions/auth/register.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/resend-verification-email.action.d.ts +12 -0
- package/dist/server/auth/application/actions/auth/resend-verification-email.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/resend-verification-email.action.js +61 -0
- package/dist/server/auth/application/actions/auth/resend-verification-email.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/reset-password.action.d.ts +10 -0
- package/dist/server/auth/application/actions/auth/reset-password.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/reset-password.action.js +52 -0
- package/dist/server/auth/application/actions/auth/reset-password.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/update-profile.action.d.ts +8 -0
- package/dist/server/auth/application/actions/auth/update-profile.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/update-profile.action.js +63 -0
- package/dist/server/auth/application/actions/auth/update-profile.action.js.map +1 -0
- package/dist/server/auth/application/actions/auth/verify-email.action.d.ts +9 -0
- package/dist/server/auth/application/actions/auth/verify-email.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/auth/verify-email.action.js +54 -0
- package/dist/server/auth/application/actions/auth/verify-email.action.js.map +1 -0
- package/dist/server/auth/application/actions/index.d.ts +5 -0
- package/dist/server/auth/application/actions/index.d.ts.map +1 -0
- package/dist/server/auth/application/actions/index.js +21 -0
- package/dist/server/auth/application/actions/index.js.map +1 -0
- package/dist/server/auth/application/actions/session/get-active-sessions.action.d.ts +8 -0
- package/dist/server/auth/application/actions/session/get-active-sessions.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/session/get-active-sessions.action.js +40 -0
- package/dist/server/auth/application/actions/session/get-active-sessions.action.js.map +1 -0
- package/dist/server/auth/application/actions/session/index.d.ts +4 -0
- package/dist/server/auth/application/actions/session/index.d.ts.map +1 -0
- package/dist/server/auth/application/actions/session/index.js +20 -0
- package/dist/server/auth/application/actions/session/index.js.map +1 -0
- package/dist/server/auth/application/actions/session/revoke-all-sessions.action.d.ts +9 -0
- package/dist/server/auth/application/actions/session/revoke-all-sessions.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/session/revoke-all-sessions.action.js +54 -0
- package/dist/server/auth/application/actions/session/revoke-all-sessions.action.js.map +1 -0
- package/dist/server/auth/application/actions/session/revoke-session.action.d.ts +9 -0
- package/dist/server/auth/application/actions/session/revoke-session.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/session/revoke-session.action.js +52 -0
- package/dist/server/auth/application/actions/session/revoke-session.action.js.map +1 -0
- package/dist/server/auth/application/actions/social/index.d.ts +2 -0
- package/dist/server/auth/application/actions/social/index.d.ts.map +1 -0
- package/dist/server/auth/application/actions/social/index.js +18 -0
- package/dist/server/auth/application/actions/social/index.js.map +1 -0
- package/dist/server/auth/application/actions/social/social-login.action.d.ts +22 -0
- package/dist/server/auth/application/actions/social/social-login.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/social/social-login.action.js +159 -0
- package/dist/server/auth/application/actions/social/social-login.action.js.map +1 -0
- package/dist/server/auth/application/actions/two-factor/disable-2fa.action.d.ts +9 -0
- package/dist/server/auth/application/actions/two-factor/disable-2fa.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/two-factor/disable-2fa.action.js +49 -0
- package/dist/server/auth/application/actions/two-factor/disable-2fa.action.js.map +1 -0
- package/dist/server/auth/application/actions/two-factor/enable-2fa.action.d.ts +13 -0
- package/dist/server/auth/application/actions/two-factor/enable-2fa.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/two-factor/enable-2fa.action.js +135 -0
- package/dist/server/auth/application/actions/two-factor/enable-2fa.action.js.map +1 -0
- package/dist/server/auth/application/actions/two-factor/index.d.ts +4 -0
- package/dist/server/auth/application/actions/two-factor/index.d.ts.map +1 -0
- package/dist/server/auth/application/actions/two-factor/index.js +20 -0
- package/dist/server/auth/application/actions/two-factor/index.js.map +1 -0
- package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.d.ts +10 -0
- package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.d.ts.map +1 -0
- package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.js +97 -0
- package/dist/server/auth/application/actions/two-factor/verify-2fa-setup.action.js.map +1 -0
- package/dist/server/auth/application/dto/change-password.dto.d.ts +5 -0
- package/dist/server/auth/application/dto/change-password.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/change-password.dto.js +33 -0
- package/dist/server/auth/application/dto/change-password.dto.js.map +1 -0
- package/dist/server/auth/application/dto/client-credentials.dto.d.ts +7 -0
- package/dist/server/auth/application/dto/client-credentials.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/client-credentials.dto.js +42 -0
- package/dist/server/auth/application/dto/client-credentials.dto.js.map +1 -0
- package/dist/server/auth/application/dto/enable-2fa-response.d.ts +7 -0
- package/dist/server/auth/application/dto/enable-2fa-response.d.ts.map +1 -0
- package/dist/server/auth/application/dto/enable-2fa-response.js +13 -0
- package/dist/server/auth/application/dto/enable-2fa-response.js.map +1 -0
- package/dist/server/auth/application/dto/enable-2fa.dto.d.ts +4 -0
- package/dist/server/auth/application/dto/enable-2fa.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/enable-2fa.dto.js +23 -0
- package/dist/server/auth/application/dto/enable-2fa.dto.js.map +1 -0
- package/dist/server/auth/application/dto/forgot-password.dto.d.ts +4 -0
- package/dist/server/auth/application/dto/forgot-password.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/forgot-password.dto.js +23 -0
- package/dist/server/auth/application/dto/forgot-password.dto.js.map +1 -0
- package/dist/server/auth/application/dto/index.d.ts +17 -0
- package/dist/server/auth/application/dto/index.d.ts.map +1 -0
- package/dist/server/auth/application/dto/index.js +33 -0
- package/dist/server/auth/application/dto/index.js.map +1 -0
- package/dist/server/auth/application/dto/login-response.d.ts +25 -0
- package/dist/server/auth/application/dto/login-response.d.ts.map +1 -0
- package/dist/server/auth/application/dto/login-response.js +15 -0
- package/dist/server/auth/application/dto/login-response.js.map +1 -0
- package/dist/server/auth/application/dto/login.dto.d.ts +10 -0
- package/dist/server/auth/application/dto/login.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/login.dto.js +59 -0
- package/dist/server/auth/application/dto/login.dto.js.map +1 -0
- package/dist/server/auth/application/dto/refresh-token.dto.d.ts +5 -0
- package/dist/server/auth/application/dto/refresh-token.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/refresh-token.dto.js +30 -0
- package/dist/server/auth/application/dto/refresh-token.dto.js.map +1 -0
- package/dist/server/auth/application/dto/register.dto.d.ts +7 -0
- package/dist/server/auth/application/dto/register.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/register.dto.js +47 -0
- package/dist/server/auth/application/dto/register.dto.js.map +1 -0
- package/dist/server/auth/application/dto/reset-password.dto.d.ts +5 -0
- package/dist/server/auth/application/dto/reset-password.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/reset-password.dto.js +33 -0
- package/dist/server/auth/application/dto/reset-password.dto.js.map +1 -0
- package/dist/server/auth/application/dto/social-login.dto.d.ts +10 -0
- package/dist/server/auth/application/dto/social-login.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/social-login.dto.js +54 -0
- package/dist/server/auth/application/dto/social-login.dto.js.map +1 -0
- package/dist/server/auth/application/dto/token-response.d.ts +9 -0
- package/dist/server/auth/application/dto/token-response.d.ts.map +1 -0
- package/dist/server/auth/application/dto/token-response.js +15 -0
- package/dist/server/auth/application/dto/token-response.js.map +1 -0
- package/dist/server/auth/application/dto/update-profile.dto.d.ts +7 -0
- package/dist/server/auth/application/dto/update-profile.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/update-profile.dto.js +41 -0
- package/dist/server/auth/application/dto/update-profile.dto.js.map +1 -0
- package/dist/server/auth/application/dto/user-response.d.ts +14 -0
- package/dist/server/auth/application/dto/user-response.d.ts.map +1 -0
- package/dist/server/auth/application/dto/user-response.js +20 -0
- package/dist/server/auth/application/dto/user-response.js.map +1 -0
- package/dist/server/auth/application/dto/verify-2fa.dto.d.ts +4 -0
- package/dist/server/auth/application/dto/verify-2fa.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/verify-2fa.dto.js +24 -0
- package/dist/server/auth/application/dto/verify-2fa.dto.js.map +1 -0
- package/dist/server/auth/application/dto/verify-email.dto.d.ts +4 -0
- package/dist/server/auth/application/dto/verify-email.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dto/verify-email.dto.js +23 -0
- package/dist/server/auth/application/dto/verify-email.dto.js.map +1 -0
- package/dist/server/auth/application/dtos/create-role.dto.d.ts +6 -0
- package/dist/server/auth/application/dtos/create-role.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dtos/create-role.dto.js +35 -0
- package/dist/server/auth/application/dtos/create-role.dto.js.map +1 -0
- package/dist/server/auth/application/dtos/index.d.ts +4 -0
- package/dist/server/auth/application/dtos/index.d.ts.map +1 -0
- package/dist/server/auth/application/dtos/index.js +20 -0
- package/dist/server/auth/application/dtos/index.js.map +1 -0
- package/dist/server/auth/application/dtos/query-role.dto.d.ts +6 -0
- package/dist/server/auth/application/dtos/query-role.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dtos/query-role.dto.js +35 -0
- package/dist/server/auth/application/dtos/query-role.dto.js.map +1 -0
- package/dist/server/auth/application/dtos/update-role.dto.d.ts +6 -0
- package/dist/server/auth/application/dtos/update-role.dto.d.ts.map +1 -0
- package/dist/server/auth/application/dtos/update-role.dto.js +36 -0
- package/dist/server/auth/application/dtos/update-role.dto.js.map +1 -0
- package/dist/server/auth/application/index.d.ts +4 -0
- package/dist/server/auth/application/index.d.ts.map +1 -0
- package/dist/server/auth/application/index.js +20 -0
- package/dist/server/auth/application/index.js.map +1 -0
- package/dist/server/auth/application/ports/email.service.d.ts +12 -0
- package/dist/server/auth/application/ports/email.service.d.ts.map +1 -0
- package/dist/server/auth/application/ports/email.service.js +5 -0
- package/dist/server/auth/application/ports/email.service.js.map +1 -0
- package/dist/server/auth/application/ports/hash.service.d.ts +7 -0
- package/dist/server/auth/application/ports/hash.service.d.ts.map +1 -0
- package/dist/server/auth/application/ports/hash.service.js +5 -0
- package/dist/server/auth/application/ports/hash.service.js.map +1 -0
- package/dist/server/auth/application/ports/index.d.ts +5 -0
- package/dist/server/auth/application/ports/index.d.ts.map +1 -0
- package/dist/server/auth/application/ports/index.js +21 -0
- package/dist/server/auth/application/ports/index.js.map +1 -0
- package/dist/server/auth/application/ports/social-auth.service.d.ts +13 -0
- package/dist/server/auth/application/ports/social-auth.service.d.ts.map +1 -0
- package/dist/server/auth/application/ports/social-auth.service.js +7 -0
- package/dist/server/auth/application/ports/social-auth.service.js.map +1 -0
- package/dist/server/auth/application/ports/token.service.d.ts +36 -0
- package/dist/server/auth/application/ports/token.service.d.ts.map +1 -0
- package/dist/server/auth/application/ports/token.service.js +5 -0
- package/dist/server/auth/application/ports/token.service.js.map +1 -0
- package/dist/server/auth/application/services/auth-user.service.d.ts +29 -0
- package/dist/server/auth/application/services/auth-user.service.d.ts.map +1 -0
- package/dist/server/auth/application/services/auth-user.service.js +165 -0
- package/dist/server/auth/application/services/auth-user.service.js.map +1 -0
- package/dist/server/auth/application/services/permission.service.d.ts +13 -0
- package/dist/server/auth/application/services/permission.service.d.ts.map +1 -0
- package/dist/server/auth/application/services/permission.service.js +56 -0
- package/dist/server/auth/application/services/permission.service.js.map +1 -0
- package/dist/server/auth/application/services/role.service.d.ts +61 -0
- package/dist/server/auth/application/services/role.service.d.ts.map +1 -0
- package/dist/server/auth/application/services/role.service.js +178 -0
- package/dist/server/auth/application/services/role.service.js.map +1 -0
- package/dist/server/auth/domain/constants/auth-events.const.d.ts +17 -0
- package/dist/server/auth/domain/constants/auth-events.const.d.ts.map +1 -0
- package/dist/server/auth/domain/constants/auth-events.const.js +19 -0
- package/dist/server/auth/domain/constants/auth-events.const.js.map +1 -0
- package/dist/server/auth/domain/constants/index.d.ts +3 -0
- package/dist/server/auth/domain/constants/index.d.ts.map +1 -0
- package/dist/server/auth/domain/constants/index.js +19 -0
- package/dist/server/auth/domain/constants/index.js.map +1 -0
- package/dist/server/auth/domain/constants/oauth.config.d.ts +50 -0
- package/dist/server/auth/domain/constants/oauth.config.d.ts.map +1 -0
- package/dist/server/auth/domain/constants/oauth.config.js +53 -0
- package/dist/server/auth/domain/constants/oauth.config.js.map +1 -0
- package/dist/server/auth/domain/constants/scopes.d.ts +26 -0
- package/dist/server/auth/domain/constants/scopes.d.ts.map +1 -0
- package/dist/server/auth/domain/constants/scopes.js +52 -0
- package/dist/server/auth/domain/constants/scopes.js.map +1 -0
- package/dist/server/auth/domain/entities/auth-user.d.ts +52 -0
- package/dist/server/auth/domain/entities/auth-user.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/auth-user.js +134 -0
- package/dist/server/auth/domain/entities/auth-user.js.map +1 -0
- package/dist/server/auth/domain/entities/email-verification-token.d.ts +13 -0
- package/dist/server/auth/domain/entities/email-verification-token.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/email-verification-token.js +27 -0
- package/dist/server/auth/domain/entities/email-verification-token.js.map +1 -0
- package/dist/server/auth/domain/entities/index.d.ts +17 -0
- package/dist/server/auth/domain/entities/index.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/index.js +33 -0
- package/dist/server/auth/domain/entities/index.js.map +1 -0
- package/dist/server/auth/domain/entities/login-history.d.ts +18 -0
- package/dist/server/auth/domain/entities/login-history.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/login-history.js +30 -0
- package/dist/server/auth/domain/entities/login-history.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-audit-log.d.ts +15 -0
- package/dist/server/auth/domain/entities/oauth-audit-log.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-audit-log.js +34 -0
- package/dist/server/auth/domain/entities/oauth-audit-log.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-authorization-code.d.ts +19 -0
- package/dist/server/auth/domain/entities/oauth-authorization-code.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-authorization-code.js +37 -0
- package/dist/server/auth/domain/entities/oauth-authorization-code.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-client-consent.d.ts +14 -0
- package/dist/server/auth/domain/entities/oauth-client-consent.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-client-consent.js +30 -0
- package/dist/server/auth/domain/entities/oauth-client-consent.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-client.d.ts +31 -0
- package/dist/server/auth/domain/entities/oauth-client.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-client.js +51 -0
- package/dist/server/auth/domain/entities/oauth-client.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-scope.d.ts +10 -0
- package/dist/server/auth/domain/entities/oauth-scope.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-scope.js +18 -0
- package/dist/server/auth/domain/entities/oauth-scope.js.map +1 -0
- package/dist/server/auth/domain/entities/oauth-token.d.ts +20 -0
- package/dist/server/auth/domain/entities/oauth-token.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/oauth-token.js +38 -0
- package/dist/server/auth/domain/entities/oauth-token.js.map +1 -0
- package/dist/server/auth/domain/entities/permission.d.ts +14 -0
- package/dist/server/auth/domain/entities/permission.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/permission.js +26 -0
- package/dist/server/auth/domain/entities/permission.js.map +1 -0
- package/dist/server/auth/domain/entities/role-permission.d.ts +8 -0
- package/dist/server/auth/domain/entities/role-permission.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/role-permission.js +14 -0
- package/dist/server/auth/domain/entities/role-permission.js.map +1 -0
- package/dist/server/auth/domain/entities/role.d.ts +13 -0
- package/dist/server/auth/domain/entities/role.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/role.js +26 -0
- package/dist/server/auth/domain/entities/role.js.map +1 -0
- package/dist/server/auth/domain/entities/social-account.d.ts +20 -0
- package/dist/server/auth/domain/entities/social-account.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/social-account.js +37 -0
- package/dist/server/auth/domain/entities/social-account.js.map +1 -0
- package/dist/server/auth/domain/entities/user-role.d.ts +8 -0
- package/dist/server/auth/domain/entities/user-role.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/user-role.js +14 -0
- package/dist/server/auth/domain/entities/user-role.js.map +1 -0
- package/dist/server/auth/domain/entities/user-session.d.ts +25 -0
- package/dist/server/auth/domain/entities/user-session.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/user-session.js +50 -0
- package/dist/server/auth/domain/entities/user-session.js.map +1 -0
- package/dist/server/auth/domain/entities/user-two-factor.d.ts +25 -0
- package/dist/server/auth/domain/entities/user-two-factor.d.ts.map +1 -0
- package/dist/server/auth/domain/entities/user-two-factor.js +66 -0
- package/dist/server/auth/domain/entities/user-two-factor.js.map +1 -0
- package/dist/server/auth/domain/enums/index.d.ts +2 -0
- package/dist/server/auth/domain/enums/index.d.ts.map +1 -0
- package/dist/server/auth/domain/enums/index.js +18 -0
- package/dist/server/auth/domain/enums/index.js.map +1 -0
- package/dist/server/auth/domain/enums/oauth.enums.d.ts +69 -0
- package/dist/server/auth/domain/enums/oauth.enums.d.ts.map +1 -0
- package/dist/server/auth/domain/enums/oauth.enums.js +130 -0
- package/dist/server/auth/domain/enums/oauth.enums.js.map +1 -0
- package/dist/server/auth/domain/events/auth-user.events.d.ts +37 -0
- package/dist/server/auth/domain/events/auth-user.events.d.ts.map +1 -0
- package/dist/server/auth/domain/events/auth-user.events.js +70 -0
- package/dist/server/auth/domain/events/auth-user.events.js.map +1 -0
- package/dist/server/auth/domain/index.d.ts +3 -0
- package/dist/server/auth/domain/index.d.ts.map +1 -0
- package/dist/server/auth/domain/index.js +19 -0
- package/dist/server/auth/domain/index.js.map +1 -0
- package/dist/server/auth/domain/interfaces/auth.interface.d.ts +41 -0
- package/dist/server/auth/domain/interfaces/auth.interface.d.ts.map +1 -0
- package/dist/server/auth/domain/interfaces/auth.interface.js +3 -0
- package/dist/server/auth/domain/interfaces/auth.interface.js.map +1 -0
- package/dist/server/auth/domain/interfaces/index.d.ts +2 -0
- package/dist/server/auth/domain/interfaces/index.d.ts.map +1 -0
- package/dist/server/auth/domain/interfaces/index.js +18 -0
- package/dist/server/auth/domain/interfaces/index.js.map +1 -0
- package/dist/server/auth/domain/repositories/auth-user.repository.d.ts +14 -0
- package/dist/server/auth/domain/repositories/auth-user.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/auth-user.repository.js +5 -0
- package/dist/server/auth/domain/repositories/auth-user.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/email-verification-token.repository.d.ts +13 -0
- package/dist/server/auth/domain/repositories/email-verification-token.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/email-verification-token.repository.js +5 -0
- package/dist/server/auth/domain/repositories/email-verification-token.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/index.d.ts +17 -0
- package/dist/server/auth/domain/repositories/index.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/index.js +33 -0
- package/dist/server/auth/domain/repositories/index.js.map +1 -0
- package/dist/server/auth/domain/repositories/login-history.repository.d.ts +11 -0
- package/dist/server/auth/domain/repositories/login-history.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/login-history.repository.js +5 -0
- package/dist/server/auth/domain/repositories/login-history.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-audit-log.repository.d.ts +12 -0
- package/dist/server/auth/domain/repositories/oauth-audit-log.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-audit-log.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-audit-log.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.d.ts +12 -0
- package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-authorization-code.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-client-consent.repository.d.ts +12 -0
- package/dist/server/auth/domain/repositories/oauth-client-consent.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-client-consent.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-client-consent.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-client.repository.d.ts +12 -0
- package/dist/server/auth/domain/repositories/oauth-client.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-client.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-client.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-scope.repository.d.ts +13 -0
- package/dist/server/auth/domain/repositories/oauth-scope.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-scope.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-scope.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-token.repository.d.ts +15 -0
- package/dist/server/auth/domain/repositories/oauth-token.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/oauth-token.repository.js +5 -0
- package/dist/server/auth/domain/repositories/oauth-token.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/permission.repository.d.ts +14 -0
- package/dist/server/auth/domain/repositories/permission.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/permission.repository.js +5 -0
- package/dist/server/auth/domain/repositories/permission.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/role-permission.repository.d.ts +14 -0
- package/dist/server/auth/domain/repositories/role-permission.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/role-permission.repository.js +5 -0
- package/dist/server/auth/domain/repositories/role-permission.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/role.repository.d.ts +13 -0
- package/dist/server/auth/domain/repositories/role.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/role.repository.js +5 -0
- package/dist/server/auth/domain/repositories/role.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/social-account.repository.d.ts +14 -0
- package/dist/server/auth/domain/repositories/social-account.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/social-account.repository.js +5 -0
- package/dist/server/auth/domain/repositories/social-account.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/user-role.repository.d.ts +13 -0
- package/dist/server/auth/domain/repositories/user-role.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/user-role.repository.js +5 -0
- package/dist/server/auth/domain/repositories/user-role.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/user-session.repository.d.ts +14 -0
- package/dist/server/auth/domain/repositories/user-session.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/user-session.repository.js +5 -0
- package/dist/server/auth/domain/repositories/user-session.repository.js.map +1 -0
- package/dist/server/auth/domain/repositories/user-two-factor.repository.d.ts +11 -0
- package/dist/server/auth/domain/repositories/user-two-factor.repository.d.ts.map +1 -0
- package/dist/server/auth/domain/repositories/user-two-factor.repository.js +5 -0
- package/dist/server/auth/domain/repositories/user-two-factor.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.d.ts +6 -0
- package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.js +1386 -0
- package/dist/server/auth/infrastructure/database/postgresql/migrations/1733400000000-CreateOAuthSystem.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.d.ts +13 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.js +75 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/1-permission.seeder.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.d.ts +15 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.js +83 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/2-role.seeder.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.d.ts +9 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.js +137 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/3-oauth-scope.seeder.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.d.ts +13 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.js +226 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/4-oauth-client.seeder.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.d.ts +13 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.js +161 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/5-test-user.seeder.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/index.d.ts +17 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/index.js +63 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/index.js.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.d.ts +3 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.js +58 -0
- package/dist/server/auth/infrastructure/database/postgresql/seeders/oauth-seeder.module.js.map +1 -0
- package/dist/server/auth/infrastructure/index.d.ts +5 -0
- package/dist/server/auth/infrastructure/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/index.js +21 -0
- package/dist/server/auth/infrastructure/index.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.d.ts +23 -0
- package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.js +120 -0
- package/dist/server/auth/infrastructure/persistence/entities/auth-user.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.d.ts +9 -0
- package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.js +50 -0
- package/dist/server/auth/infrastructure/persistence/entities/email-verification-token.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/index.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/entities/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/index.js +33 -0
- package/dist/server/auth/infrastructure/persistence/entities/index.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.d.ts +14 -0
- package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.js +71 -0
- package/dist/server/auth/infrastructure/persistence/entities/login-history.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.d.ts +12 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.js +65 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-audit-log.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.d.ts +14 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.js +75 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-authorization-code.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.d.ts +11 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.js +60 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client-consent.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.d.ts +23 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.js +120 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-client.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.js +45 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-scope.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.d.ts +14 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.js +75 -0
- package/dist/server/auth/infrastructure/persistence/entities/oauth-token.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/permission.entity.d.ts +9 -0
- package/dist/server/auth/infrastructure/persistence/entities/permission.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/permission.entity.js +50 -0
- package/dist/server/auth/infrastructure/persistence/entities/permission.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.d.ts +7 -0
- package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.js +40 -0
- package/dist/server/auth/infrastructure/persistence/entities/role-permission.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/role.entity.d.ts +9 -0
- package/dist/server/auth/infrastructure/persistence/entities/role.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/role.entity.js +50 -0
- package/dist/server/auth/infrastructure/persistence/entities/role.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.js +86 -0
- package/dist/server/auth/infrastructure/persistence/entities/social-account.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.d.ts +7 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.js +40 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-role.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.d.ts +18 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.js +95 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-session.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.d.ts +15 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.js +76 -0
- package/dist/server/auth/infrastructure/persistence/entities/user-two-factor.entity.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.d.ts +9 -0
- package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.js +75 -0
- package/dist/server/auth/infrastructure/persistence/mappers/auth-user.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.js +46 -0
- package/dist/server/auth/infrastructure/persistence/mappers/email-verification-token.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/index.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/mappers/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/index.js +33 -0
- package/dist/server/auth/infrastructure/persistence/mappers/index.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.js +54 -0
- package/dist/server/auth/infrastructure/persistence/mappers/login-history.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.js +52 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-audit-log.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.js +56 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-authorization-code.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.js +46 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client-consent.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.js +74 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-client.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.js +44 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-scope.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.js +56 -0
- package/dist/server/auth/infrastructure/persistence/mappers/oauth-token.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.js +46 -0
- package/dist/server/auth/infrastructure/persistence/mappers/permission.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.js +42 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role-permission.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.js +46 -0
- package/dist/server/auth/infrastructure/persistence/mappers/role.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.js +58 -0
- package/dist/server/auth/infrastructure/persistence/mappers/social-account.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.js +42 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-role.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.js +62 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-session.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.d.ts +8 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.js +56 -0
- package/dist/server/auth/infrastructure/persistence/mappers/user-two-factor.mapper.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.d.ts +20 -0
- package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.js +74 -0
- package/dist/server/auth/infrastructure/persistence/repositories/auth-user.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.d.ts +19 -0
- package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.js +67 -0
- package/dist/server/auth/infrastructure/persistence/repositories/email-verification-token.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/index.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/repositories/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/index.js +33 -0
- package/dist/server/auth/infrastructure/persistence/repositories/index.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.js +70 -0
- package/dist/server/auth/infrastructure/persistence/repositories/login-history.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.d.ts +18 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.js +77 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-audit-log.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.d.ts +18 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.js +64 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-authorization-code.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.d.ts +18 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.js +66 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client-consent.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.d.ts +18 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.js +65 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-client.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.d.ts +19 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.js +69 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-scope.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.d.ts +22 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.js +93 -0
- package/dist/server/auth/infrastructure/persistence/repositories/oauth-token.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.d.ts +20 -0
- package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.js +75 -0
- package/dist/server/auth/infrastructure/persistence/repositories/permission.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.d.ts +20 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.js +79 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role-permission.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role.repository.d.ts +19 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role.repository.js +69 -0
- package/dist/server/auth/infrastructure/persistence/repositories/role.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.d.ts +20 -0
- package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.js +72 -0
- package/dist/server/auth/infrastructure/persistence/repositories/social-account.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.d.ts +19 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.js +66 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-role.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.d.ts +20 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.js +85 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-session.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.d.ts +17 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.js +60 -0
- package/dist/server/auth/infrastructure/persistence/repositories/user-two-factor.repository.js.map +1 -0
- package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.d.ts +17 -0
- package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.js +105 -0
- package/dist/server/auth/infrastructure/schedulers/cleanup.scheduler.js.map +1 -0
- package/dist/server/auth/infrastructure/schedulers/index.d.ts +2 -0
- package/dist/server/auth/infrastructure/schedulers/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/schedulers/index.js +18 -0
- package/dist/server/auth/infrastructure/schedulers/index.js.map +1 -0
- package/dist/server/auth/infrastructure/services/authorization-code.service.d.ts +22 -0
- package/dist/server/auth/infrastructure/services/authorization-code.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/authorization-code.service.js +176 -0
- package/dist/server/auth/infrastructure/services/authorization-code.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/bcrypt-hash.service.d.ts +8 -0
- package/dist/server/auth/infrastructure/services/bcrypt-hash.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/bcrypt-hash.service.js +61 -0
- package/dist/server/auth/infrastructure/services/bcrypt-hash.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/consent.service.d.ts +19 -0
- package/dist/server/auth/infrastructure/services/consent.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/consent.service.js +121 -0
- package/dist/server/auth/infrastructure/services/consent.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/email-verification.service.d.ts +11 -0
- package/dist/server/auth/infrastructure/services/email-verification.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/email-verification.service.js +52 -0
- package/dist/server/auth/infrastructure/services/email-verification.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/google-auth.service.d.ts +11 -0
- package/dist/server/auth/infrastructure/services/google-auth.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/google-auth.service.js +68 -0
- package/dist/server/auth/infrastructure/services/google-auth.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/index.d.ts +11 -0
- package/dist/server/auth/infrastructure/services/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/index.js +27 -0
- package/dist/server/auth/infrastructure/services/index.js.map +1 -0
- package/dist/server/auth/infrastructure/services/jwt-token.service.d.ts +41 -0
- package/dist/server/auth/infrastructure/services/jwt-token.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/jwt-token.service.js +112 -0
- package/dist/server/auth/infrastructure/services/jwt-token.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/nodemailer-email.service.d.ts +17 -0
- package/dist/server/auth/infrastructure/services/nodemailer-email.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/nodemailer-email.service.js +125 -0
- package/dist/server/auth/infrastructure/services/nodemailer-email.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/oauth-token.service.d.ts +27 -0
- package/dist/server/auth/infrastructure/services/oauth-token.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/oauth-token.service.js +215 -0
- package/dist/server/auth/infrastructure/services/oauth-token.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/root-account.service.d.ts +19 -0
- package/dist/server/auth/infrastructure/services/root-account.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/root-account.service.js +91 -0
- package/dist/server/auth/infrastructure/services/root-account.service.js.map +1 -0
- package/dist/server/auth/infrastructure/services/session.service.d.ts +11 -0
- package/dist/server/auth/infrastructure/services/session.service.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/services/session.service.js +49 -0
- package/dist/server/auth/infrastructure/services/session.service.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/facebook.strategy.d.ts +16 -0
- package/dist/server/auth/infrastructure/strategies/facebook.strategy.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/facebook.strategy.js +100 -0
- package/dist/server/auth/infrastructure/strategies/facebook.strategy.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/github.strategy.d.ts +16 -0
- package/dist/server/auth/infrastructure/strategies/github.strategy.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/github.strategy.js +99 -0
- package/dist/server/auth/infrastructure/strategies/github.strategy.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/google.strategy.d.ts +16 -0
- package/dist/server/auth/infrastructure/strategies/google.strategy.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/google.strategy.js +99 -0
- package/dist/server/auth/infrastructure/strategies/google.strategy.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/index.d.ts +2 -0
- package/dist/server/auth/infrastructure/strategies/index.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/index.js +18 -0
- package/dist/server/auth/infrastructure/strategies/index.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/jwt.strategy.d.ts +20 -0
- package/dist/server/auth/infrastructure/strategies/jwt.strategy.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/jwt.strategy.js +68 -0
- package/dist/server/auth/infrastructure/strategies/jwt.strategy.js.map +1 -0
- package/dist/server/auth/infrastructure/strategies/local.strategy.d.ts +13 -0
- package/dist/server/auth/infrastructure/strategies/local.strategy.d.ts.map +1 -0
- package/dist/server/auth/infrastructure/strategies/local.strategy.js +83 -0
- package/dist/server/auth/infrastructure/strategies/local.strategy.js.map +1 -0
- package/dist/server/auth/oauth.module.d.ts +3 -0
- package/dist/server/auth/oauth.module.d.ts.map +1 -0
- package/dist/server/auth/oauth.module.js +235 -0
- package/dist/server/auth/oauth.module.js.map +1 -0
- package/dist/server/auth/presentation/controllers/auth.controller.d.ts +72 -0
- package/dist/server/auth/presentation/controllers/auth.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/auth.controller.js +280 -0
- package/dist/server/auth/presentation/controllers/auth.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/email.controller.d.ts +17 -0
- package/dist/server/auth/presentation/controllers/email.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/email.controller.js +75 -0
- package/dist/server/auth/presentation/controllers/email.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/index.d.ts +9 -0
- package/dist/server/auth/presentation/controllers/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/index.js +25 -0
- package/dist/server/auth/presentation/controllers/index.js.map +1 -0
- package/dist/server/auth/presentation/controllers/password.controller.d.ts +19 -0
- package/dist/server/auth/presentation/controllers/password.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/password.controller.js +75 -0
- package/dist/server/auth/presentation/controllers/password.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/permission.controller.d.ts +11 -0
- package/dist/server/auth/presentation/controllers/permission.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/permission.controller.js +43 -0
- package/dist/server/auth/presentation/controllers/permission.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/role.controller.d.ts +32 -0
- package/dist/server/auth/presentation/controllers/role.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/role.controller.js +97 -0
- package/dist/server/auth/presentation/controllers/role.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/session.controller.d.ts +23 -0
- package/dist/server/auth/presentation/controllers/session.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/session.controller.js +92 -0
- package/dist/server/auth/presentation/controllers/session.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/social-auth.controller.d.ts +12 -0
- package/dist/server/auth/presentation/controllers/social-auth.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/social-auth.controller.js +58 -0
- package/dist/server/auth/presentation/controllers/social-auth.controller.js.map +1 -0
- package/dist/server/auth/presentation/controllers/two-factor.controller.d.ts +23 -0
- package/dist/server/auth/presentation/controllers/two-factor.controller.d.ts.map +1 -0
- package/dist/server/auth/presentation/controllers/two-factor.controller.js +94 -0
- package/dist/server/auth/presentation/controllers/two-factor.controller.js.map +1 -0
- package/dist/server/auth/presentation/decorators/auth.decorator.d.ts +7 -0
- package/dist/server/auth/presentation/decorators/auth.decorator.d.ts.map +1 -0
- package/dist/server/auth/presentation/decorators/auth.decorator.js +14 -0
- package/dist/server/auth/presentation/decorators/auth.decorator.js.map +1 -0
- package/dist/server/auth/presentation/decorators/current-session-id.decorator.d.ts +2 -0
- package/dist/server/auth/presentation/decorators/current-session-id.decorator.d.ts.map +1 -0
- package/dist/server/auth/presentation/decorators/current-session-id.decorator.js +9 -0
- package/dist/server/auth/presentation/decorators/current-session-id.decorator.js.map +1 -0
- package/dist/server/auth/presentation/decorators/index.d.ts +4 -0
- package/dist/server/auth/presentation/decorators/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/decorators/index.js +20 -0
- package/dist/server/auth/presentation/decorators/index.js.map +1 -0
- package/dist/server/auth/presentation/decorators/require-permissions.decorator.d.ts +3 -0
- package/dist/server/auth/presentation/decorators/require-permissions.decorator.d.ts.map +1 -0
- package/dist/server/auth/presentation/decorators/require-permissions.decorator.js +8 -0
- package/dist/server/auth/presentation/decorators/require-permissions.decorator.js.map +1 -0
- package/dist/server/auth/presentation/decorators/user.decorator.d.ts +7 -0
- package/dist/server/auth/presentation/decorators/user.decorator.d.ts.map +1 -0
- package/dist/server/auth/presentation/decorators/user.decorator.js +29 -0
- package/dist/server/auth/presentation/decorators/user.decorator.js.map +1 -0
- package/dist/server/auth/presentation/filters/global-exception.filter.d.ts +5 -0
- package/dist/server/auth/presentation/filters/global-exception.filter.d.ts.map +1 -0
- package/dist/server/auth/presentation/filters/global-exception.filter.js +44 -0
- package/dist/server/auth/presentation/filters/global-exception.filter.js.map +1 -0
- package/dist/server/auth/presentation/filters/index.d.ts +2 -0
- package/dist/server/auth/presentation/filters/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/filters/index.js +18 -0
- package/dist/server/auth/presentation/filters/index.js.map +1 -0
- package/dist/server/auth/presentation/guards/index.d.ts +3 -0
- package/dist/server/auth/presentation/guards/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/guards/index.js +19 -0
- package/dist/server/auth/presentation/guards/index.js.map +1 -0
- package/dist/server/auth/presentation/guards/jwt-auth.guard.d.ts +11 -0
- package/dist/server/auth/presentation/guards/jwt-auth.guard.d.ts.map +1 -0
- package/dist/server/auth/presentation/guards/jwt-auth.guard.js +45 -0
- package/dist/server/auth/presentation/guards/jwt-auth.guard.js.map +1 -0
- package/dist/server/auth/presentation/guards/permission.guard.d.ts +17 -0
- package/dist/server/auth/presentation/guards/permission.guard.d.ts.map +1 -0
- package/dist/server/auth/presentation/guards/permission.guard.js +87 -0
- package/dist/server/auth/presentation/guards/permission.guard.js.map +1 -0
- package/dist/server/auth/presentation/index.d.ts +4 -0
- package/dist/server/auth/presentation/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/index.js +20 -0
- package/dist/server/auth/presentation/index.js.map +1 -0
- package/dist/server/auth/presentation/responses/oauth.response.d.ts +26 -0
- package/dist/server/auth/presentation/responses/oauth.response.d.ts.map +1 -0
- package/dist/server/auth/presentation/responses/oauth.response.js +33 -0
- package/dist/server/auth/presentation/responses/oauth.response.js.map +1 -0
- package/dist/server/auth/presentation/validators/index.d.ts +2 -0
- package/dist/server/auth/presentation/validators/index.d.ts.map +1 -0
- package/dist/server/auth/presentation/validators/index.js +18 -0
- package/dist/server/auth/presentation/validators/index.js.map +1 -0
- package/dist/server/auth/presentation/validators/is-username-unique.validator.d.ts +10 -0
- package/dist/server/auth/presentation/validators/is-username-unique.validator.d.ts.map +1 -0
- package/dist/server/auth/presentation/validators/is-username-unique.validator.js +54 -0
- package/dist/server/auth/presentation/validators/is-username-unique.validator.js.map +1 -0
- package/dist/server/auth/presentation/validators/password.validator.d.ts +4 -0
- package/dist/server/auth/presentation/validators/password.validator.d.ts.map +1 -0
- package/dist/server/auth/presentation/validators/password.validator.js +56 -0
- package/dist/server/auth/presentation/validators/password.validator.js.map +1 -0
- package/dist/server/common/events/mail/index.d.ts +7 -0
- package/dist/server/common/events/mail/index.d.ts.map +1 -0
- package/dist/server/common/events/mail/index.js +16 -0
- package/dist/server/common/events/mail/index.js.map +1 -0
- package/dist/server/common/events/mail/mail-events.constants.d.ts +9 -0
- package/dist/server/common/events/mail/mail-events.constants.d.ts.map +1 -0
- package/dist/server/common/events/mail/mail-events.constants.js +11 -0
- package/dist/server/common/events/mail/mail-events.constants.js.map +1 -0
- package/dist/server/common/events/mail/send-password-changed.event.d.ts +7 -0
- package/dist/server/common/events/mail/send-password-changed.event.d.ts.map +1 -0
- package/dist/server/common/events/mail/send-password-changed.event.js +15 -0
- package/dist/server/common/events/mail/send-password-changed.event.js.map +1 -0
- package/dist/server/common/events/mail/send-password-reset.event.d.ts +7 -0
- package/dist/server/common/events/mail/send-password-reset.event.d.ts.map +1 -0
- package/dist/server/common/events/mail/send-password-reset.event.js +15 -0
- package/dist/server/common/events/mail/send-password-reset.event.js.map +1 -0
- package/dist/server/common/events/mail/send-user-welcome.event.d.ts +7 -0
- package/dist/server/common/events/mail/send-user-welcome.event.d.ts.map +1 -0
- package/dist/server/common/events/mail/send-user-welcome.event.js +15 -0
- package/dist/server/common/events/mail/send-user-welcome.event.js.map +1 -0
- package/dist/server/common/events/mail/send-verification-email.event.d.ts +7 -0
- package/dist/server/common/events/mail/send-verification-email.event.d.ts.map +1 -0
- package/dist/server/common/events/mail/send-verification-email.event.js +15 -0
- package/dist/server/common/events/mail/send-verification-email.event.js.map +1 -0
- package/dist/server/common/events/mail/send-welcome-email.event.d.ts +6 -0
- package/dist/server/common/events/mail/send-welcome-email.event.d.ts.map +1 -0
- package/dist/server/common/events/mail/send-welcome-email.event.js +13 -0
- package/dist/server/common/events/mail/send-welcome-email.event.js.map +1 -0
- package/dist/server/index.d.ts +40 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +139 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/lib/responder.d.ts +33 -0
- package/dist/server/lib/responder.d.ts.map +1 -0
- package/dist/server/lib/responder.js +75 -0
- package/dist/server/lib/responder.js.map +1 -0
- package/dist/server/shared/index.d.ts +3 -0
- package/dist/server/shared/index.d.ts.map +1 -0
- package/dist/server/shared/index.js +12 -0
- package/dist/server/shared/index.js.map +1 -0
- package/dist/server/shared/permissions.d.ts +78 -0
- package/dist/server/shared/permissions.d.ts.map +1 -0
- package/dist/server/shared/permissions.js +74 -0
- package/dist/server/shared/permissions.js.map +1 -0
- package/dist/server/shared/roles.d.ts +30 -0
- package/dist/server/shared/roles.d.ts.map +1 -0
- package/dist/server/shared/roles.js +31 -0
- package/dist/server/shared/roles.js.map +1 -0
- package/dist/server/user/application/dto/admin-user.dto.d.ts +51 -0
- package/dist/server/user/application/dto/admin-user.dto.d.ts.map +1 -0
- package/dist/server/user/application/dto/admin-user.dto.js +225 -0
- package/dist/server/user/application/dto/admin-user.dto.js.map +1 -0
- package/dist/server/user/application/dto/user-preferences.dto.d.ts +36 -0
- package/dist/server/user/application/dto/user-preferences.dto.d.ts.map +1 -0
- package/dist/server/user/application/dto/user-preferences.dto.js +76 -0
- package/dist/server/user/application/dto/user-preferences.dto.js.map +1 -0
- package/dist/server/user/application/listeners/auth-user-event.listener.d.ts +11 -0
- package/dist/server/user/application/listeners/auth-user-event.listener.d.ts.map +1 -0
- package/dist/server/user/application/listeners/auth-user-event.listener.js +114 -0
- package/dist/server/user/application/listeners/auth-user-event.listener.js.map +1 -0
- package/dist/server/user/application/repositories/user-setting.repository.d.ts +13 -0
- package/dist/server/user/application/repositories/user-setting.repository.d.ts.map +1 -0
- package/dist/server/user/application/repositories/user-setting.repository.js +84 -0
- package/dist/server/user/application/repositories/user-setting.repository.js.map +1 -0
- package/dist/server/user/application/services/user-preferences.service.d.ts +12 -0
- package/dist/server/user/application/services/user-preferences.service.d.ts.map +1 -0
- package/dist/server/user/application/services/user-preferences.service.js +65 -0
- package/dist/server/user/application/services/user-preferences.service.js.map +1 -0
- package/dist/server/user/application/services/user.service.d.ts +56 -0
- package/dist/server/user/application/services/user.service.d.ts.map +1 -0
- package/dist/server/user/application/services/user.service.js +213 -0
- package/dist/server/user/application/services/user.service.js.map +1 -0
- package/dist/server/user/domain/constants/user-events.const.d.ts +9 -0
- package/dist/server/user/domain/constants/user-events.const.d.ts.map +1 -0
- package/dist/server/user/domain/constants/user-events.const.js +11 -0
- package/dist/server/user/domain/constants/user-events.const.js.map +1 -0
- package/dist/server/user/domain/entities/user.entity.d.ts +37 -0
- package/dist/server/user/domain/entities/user.entity.d.ts.map +1 -0
- package/dist/server/user/domain/entities/user.entity.js +71 -0
- package/dist/server/user/domain/entities/user.entity.js.map +1 -0
- package/dist/server/user/domain/repositories/user.repository.d.ts +26 -0
- package/dist/server/user/domain/repositories/user.repository.d.ts.map +1 -0
- package/dist/server/user/domain/repositories/user.repository.js +3 -0
- package/dist/server/user/domain/repositories/user.repository.js.map +1 -0
- package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.d.ts +29 -0
- package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.d.ts.map +1 -0
- package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.js +82 -0
- package/dist/server/user/infrastructure/persistence/entities/user-setting.entity.js.map +1 -0
- package/dist/server/user/infrastructure/persistence/entities/user.entity.d.ts +19 -0
- package/dist/server/user/infrastructure/persistence/entities/user.entity.d.ts.map +1 -0
- package/dist/server/user/infrastructure/persistence/entities/user.entity.js +100 -0
- package/dist/server/user/infrastructure/persistence/entities/user.entity.js.map +1 -0
- package/dist/server/user/infrastructure/persistence/mappers/user.mapper.d.ts +8 -0
- package/dist/server/user/infrastructure/persistence/mappers/user.mapper.d.ts.map +1 -0
- package/dist/server/user/infrastructure/persistence/mappers/user.mapper.js +59 -0
- package/dist/server/user/infrastructure/persistence/mappers/user.mapper.js.map +1 -0
- package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.d.ts +31 -0
- package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.d.ts.map +1 -0
- package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.js +123 -0
- package/dist/server/user/infrastructure/persistence/repositories/user.repository.impl.js.map +1 -0
- package/dist/server/user/presentation/controllers/admin-user.controller.d.ts +77 -0
- package/dist/server/user/presentation/controllers/admin-user.controller.d.ts.map +1 -0
- package/dist/server/user/presentation/controllers/admin-user.controller.js +358 -0
- package/dist/server/user/presentation/controllers/admin-user.controller.js.map +1 -0
- package/dist/server/user/user.module.d.ts +3 -0
- package/dist/server/user/user.module.d.ts.map +1 -0
- package/dist/server/user/user.module.js +46 -0
- package/dist/server/user/user.module.js.map +1 -0
- package/package.json +2 -2
- package/src/client/styles/globals.css +2 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
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;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
+
};
|
|
44
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
45
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.Enable2FAAction = void 0;
|
|
49
|
+
const common_1 = require("@nestjs/common");
|
|
50
|
+
const speakeasy = __importStar(require("speakeasy"));
|
|
51
|
+
const qrcode = __importStar(require("qrcode"));
|
|
52
|
+
const auth_user_repository_1 = require("../../../domain/repositories/auth-user.repository");
|
|
53
|
+
const user_two_factor_repository_1 = require("../../../domain/repositories/user-two-factor.repository");
|
|
54
|
+
const enable_2fa_response_1 = require("../../dto/enable-2fa-response");
|
|
55
|
+
const user_two_factor_1 = require("../../../domain/entities/user-two-factor");
|
|
56
|
+
const enums_1 = require("../../../domain/enums");
|
|
57
|
+
let Enable2FAAction = class Enable2FAAction {
|
|
58
|
+
authUserRepository;
|
|
59
|
+
twoFactorRepository;
|
|
60
|
+
constructor(authUserRepository, twoFactorRepository) {
|
|
61
|
+
this.authUserRepository = authUserRepository;
|
|
62
|
+
this.twoFactorRepository = twoFactorRepository;
|
|
63
|
+
}
|
|
64
|
+
async handle(userId, dto) {
|
|
65
|
+
const user = await this.authUserRepository.findById(userId);
|
|
66
|
+
if (!user) {
|
|
67
|
+
throw new common_1.NotFoundException('User không tồn tại');
|
|
68
|
+
}
|
|
69
|
+
if (user.twoFactorEnabled) {
|
|
70
|
+
throw new common_1.BadRequestException('2FA đã được kích hoạt');
|
|
71
|
+
}
|
|
72
|
+
if (dto.method === 'TOTP') {
|
|
73
|
+
return this.setupTOTP(user.id, user.email);
|
|
74
|
+
}
|
|
75
|
+
else if (dto.method === 'EMAIL') {
|
|
76
|
+
return this.setupEmailOTP(user.id);
|
|
77
|
+
}
|
|
78
|
+
throw new common_1.BadRequestException('Phương thức 2FA không hợp lệ');
|
|
79
|
+
}
|
|
80
|
+
async setupTOTP(userId, userEmail) {
|
|
81
|
+
const secret = speakeasy.generateSecret({
|
|
82
|
+
name: `OAuth App (${userEmail})`,
|
|
83
|
+
length: 32,
|
|
84
|
+
});
|
|
85
|
+
const qrCodeDataUrl = await qrcode.toDataURL(secret.otpauth_url);
|
|
86
|
+
const existingTwoFactor = await this.twoFactorRepository.findByUserId(userId);
|
|
87
|
+
if (existingTwoFactor) {
|
|
88
|
+
existingTwoFactor.totpSecret = secret.base32;
|
|
89
|
+
existingTwoFactor.method = enums_1.TwoFactorMethod.TOTP;
|
|
90
|
+
existingTwoFactor.verifiedAt = null;
|
|
91
|
+
await this.twoFactorRepository.save(existingTwoFactor);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
const twoFactor = new user_two_factor_1.UserTwoFactor({
|
|
95
|
+
userId,
|
|
96
|
+
totpSecret: secret.base32,
|
|
97
|
+
method: enums_1.TwoFactorMethod.TOTP,
|
|
98
|
+
verifiedAt: null,
|
|
99
|
+
});
|
|
100
|
+
await this.twoFactorRepository.create(twoFactor);
|
|
101
|
+
}
|
|
102
|
+
return new enable_2fa_response_1.Enable2FAResponse({
|
|
103
|
+
qrCode: qrCodeDataUrl,
|
|
104
|
+
secret: secret.base32,
|
|
105
|
+
method: 'TOTP',
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
async setupEmailOTP(userId) {
|
|
109
|
+
const existingTwoFactor = await this.twoFactorRepository.findByUserId(userId);
|
|
110
|
+
if (existingTwoFactor) {
|
|
111
|
+
existingTwoFactor.method = enums_1.TwoFactorMethod.EMAIL;
|
|
112
|
+
existingTwoFactor.markAsVerified();
|
|
113
|
+
await this.twoFactorRepository.save(existingTwoFactor);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
const twoFactor = new user_two_factor_1.UserTwoFactor({
|
|
117
|
+
userId,
|
|
118
|
+
method: enums_1.TwoFactorMethod.EMAIL,
|
|
119
|
+
isVerified: true,
|
|
120
|
+
});
|
|
121
|
+
await this.twoFactorRepository.create(twoFactor);
|
|
122
|
+
}
|
|
123
|
+
return new enable_2fa_response_1.Enable2FAResponse({
|
|
124
|
+
method: 'EMAIL',
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
exports.Enable2FAAction = Enable2FAAction;
|
|
129
|
+
exports.Enable2FAAction = Enable2FAAction = __decorate([
|
|
130
|
+
(0, common_1.Injectable)(),
|
|
131
|
+
__param(0, (0, common_1.Inject)(auth_user_repository_1.AUTH_USER_REPOSITORY_TOKEN)),
|
|
132
|
+
__param(1, (0, common_1.Inject)(user_two_factor_repository_1.USER_TWO_FACTOR_REPOSITORY_TOKEN)),
|
|
133
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
134
|
+
], Enable2FAAction);
|
|
135
|
+
//# sourceMappingURL=enable-2fa.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enable-2fa.action.js","sourceRoot":"","sources":["../../../../../../src/server/auth/application/actions/two-factor/enable-2fa.action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAKwB;AACxB,qDAAuC;AACvC,+CAAiC;AAEjC,4FAG2D;AAC3D,wGAGiE;AAEjE,uEAAkE;AAClE,8EAAyE;AACzE,iDAAwD;AAGjD,IAAM,eAAe,GAArB,MAAM,eAAe;IAGP;IAEA;IAJnB,YAEmB,kBAAsC,EAEtC,mBAA4C;QAF5C,uBAAkB,GAAlB,kBAAkB,CAAoB;QAEtC,wBAAmB,GAAnB,mBAAmB,CAAyB;IAC5D,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,MAAc,EAAE,GAAiB;QAE5C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAE5D,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,0BAAiB,CAAC,oBAAoB,CAAC,CAAC;QACpD,CAAC;QAGD,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,MAAM,IAAI,4BAAmB,CAAC,uBAAuB,CAAC,CAAC;QACzD,CAAC;QAGD,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7C,CAAC;aAAM,IAAI,GAAG,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;YAClC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACrC,CAAC;QAED,MAAM,IAAI,4BAAmB,CAAC,8BAA8B,CAAC,CAAC;IAChE,CAAC;IAEO,KAAK,CAAC,SAAS,CACrB,MAAc,EACd,SAAiB;QAGjB,MAAM,MAAM,GAAG,SAAS,CAAC,cAAc,CAAC;YACtC,IAAI,EAAE,cAAc,SAAS,GAAG;YAChC,MAAM,EAAE,EAAE;SACX,CAAC,CAAC;QAGH,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAGjE,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,YAAY,CACnE,MAAM,CACP,CAAC;QAEF,IAAI,iBAAiB,EAAE,CAAC;YAEtB,iBAAiB,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;YAC7C,iBAAiB,CAAC,MAAM,GAAG,uBAAe,CAAC,IAAI,CAAC;YAChD,iBAAiB,CAAC,UAAU,GAAG,IAAI,CAAC;YACpC,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YAEN,MAAM,SAAS,GAAG,IAAI,+BAAa,CAAC;gBAClC,MAAM;gBACN,UAAU,EAAE,MAAM,CAAC,MAAM;gBACzB,MAAM,EAAE,uBAAe,CAAC,IAAI;gBAC5B,UAAU,EAAE,IAAI;aACjB,CAAC,CAAC;YACH,MAAM,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACnD,CAAC;QAED,OAAO,IAAI,uCAAiB,CAAC;YAC3B,MAAM,EAAE,aAAa;YACrB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,MAAM,EAAE,MAAM;SACf,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,aAAa,CAAC,MAAc;QAExC,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,YAAY,CACnE,MAAM,CACP,CAAC;QAEF,IAAI,iBAAiB,EAAE,CAAC;YACtB,iBAAiB,CAAC,MAAM,GAAG,uBAAe,CAAC,KAAK,CAAC;YACjD,iBAAiB,CAAC,cAAc,EAAE,CAAC;YACnC,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACN,MAAM,SAAS,GAAG,IAAI,+BAAa,CAAC;gBAClC,MAAM;gBACN,MAAM,EAAE,uBAAe,CAAC,KAAK;gBAC7B,UAAU,EAAE,IAAI;aACjB,CAAC,CAAC;YACH,MAAM,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACnD,CAAC;QAED,OAAO,IAAI,uCAAiB,CAAC;YAC3B,MAAM,EAAE,OAAO;SAChB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAhGY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,iDAA0B,CAAC,CAAA;IAElC,WAAA,IAAA,eAAM,EAAC,6DAAgC,CAAC,CAAA;;GAJhC,eAAe,CAgG3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/server/auth/application/actions/two-factor/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enable-2fa.action"), exports);
|
|
18
|
+
__exportStar(require("./verify-2fa-setup.action"), exports);
|
|
19
|
+
__exportStar(require("./disable-2fa.action"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/server/auth/application/actions/two-factor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,4DAA0C;AAC1C,uDAAqC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AuthUserRepository } from '../../../domain/repositories/auth-user.repository';
|
|
2
|
+
import { UserTwoFactorRepository } from '../../../domain/repositories/user-two-factor.repository';
|
|
3
|
+
import { Verify2FADto } from '../../dto/verify-2fa.dto';
|
|
4
|
+
export declare class Verify2FASetupAction {
|
|
5
|
+
private readonly authUserRepository;
|
|
6
|
+
private readonly twoFactorRepository;
|
|
7
|
+
constructor(authUserRepository: AuthUserRepository, twoFactorRepository: UserTwoFactorRepository);
|
|
8
|
+
handle(userId: number, dto: Verify2FADto): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=verify-2fa-setup.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-2fa-setup.action.d.ts","sourceRoot":"","sources":["../../../../../../src/server/auth/application/actions/two-factor/verify-2fa-setup.action.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,kBAAkB,EACnB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAEL,uBAAuB,EACxB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGxD,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAFnB,kBAAkB,EAAE,kBAAkB,EAEtC,mBAAmB,EAAE,uBAAuB;IAGzD,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CA0C/D"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
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;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
+
};
|
|
44
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
45
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.Verify2FASetupAction = void 0;
|
|
49
|
+
const common_1 = require("@nestjs/common");
|
|
50
|
+
const speakeasy = __importStar(require("speakeasy"));
|
|
51
|
+
const auth_user_repository_1 = require("../../../domain/repositories/auth-user.repository");
|
|
52
|
+
const user_two_factor_repository_1 = require("../../../domain/repositories/user-two-factor.repository");
|
|
53
|
+
const enums_1 = require("../../../domain/enums");
|
|
54
|
+
let Verify2FASetupAction = class Verify2FASetupAction {
|
|
55
|
+
authUserRepository;
|
|
56
|
+
twoFactorRepository;
|
|
57
|
+
constructor(authUserRepository, twoFactorRepository) {
|
|
58
|
+
this.authUserRepository = authUserRepository;
|
|
59
|
+
this.twoFactorRepository = twoFactorRepository;
|
|
60
|
+
}
|
|
61
|
+
async handle(userId, dto) {
|
|
62
|
+
const user = await this.authUserRepository.findById(userId);
|
|
63
|
+
if (!user) {
|
|
64
|
+
throw new common_1.NotFoundException('User không tồn tại');
|
|
65
|
+
}
|
|
66
|
+
const twoFactor = await this.twoFactorRepository.findByUserId(userId);
|
|
67
|
+
if (!twoFactor) {
|
|
68
|
+
throw new common_1.NotFoundException('Chưa thiết lập 2FA');
|
|
69
|
+
}
|
|
70
|
+
if (twoFactor.isVerified) {
|
|
71
|
+
throw new Error('2FA đã được xác thực');
|
|
72
|
+
}
|
|
73
|
+
if (twoFactor.method === enums_1.TwoFactorMethod.TOTP) {
|
|
74
|
+
const isValid = speakeasy.totp.verify({
|
|
75
|
+
secret: twoFactor.totpSecret,
|
|
76
|
+
encoding: 'base32',
|
|
77
|
+
token: dto.code,
|
|
78
|
+
window: 2,
|
|
79
|
+
});
|
|
80
|
+
if (!isValid) {
|
|
81
|
+
throw new common_1.UnauthorizedException('Mã xác thực không đúng');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
twoFactor.markAsVerified();
|
|
85
|
+
await this.twoFactorRepository.save(twoFactor);
|
|
86
|
+
user.enable2FA(twoFactor.method);
|
|
87
|
+
await this.authUserRepository.save(user);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
exports.Verify2FASetupAction = Verify2FASetupAction;
|
|
91
|
+
exports.Verify2FASetupAction = Verify2FASetupAction = __decorate([
|
|
92
|
+
(0, common_1.Injectable)(),
|
|
93
|
+
__param(0, (0, common_1.Inject)(auth_user_repository_1.AUTH_USER_REPOSITORY_TOKEN)),
|
|
94
|
+
__param(1, (0, common_1.Inject)(user_two_factor_repository_1.USER_TWO_FACTOR_REPOSITORY_TOKEN)),
|
|
95
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
96
|
+
], Verify2FASetupAction);
|
|
97
|
+
//# sourceMappingURL=verify-2fa-setup.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-2fa-setup.action.js","sourceRoot":"","sources":["../../../../../../src/server/auth/application/actions/two-factor/verify-2fa-setup.action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAKwB;AACxB,qDAAuC;AAEvC,4FAG2D;AAC3D,wGAGiE;AAEjE,iDAAwD;AAGjD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAGZ;IAEA;IAJnB,YAEmB,kBAAsC,EAEtC,mBAA4C;QAF5C,uBAAkB,GAAlB,kBAAkB,CAAoB;QAEtC,wBAAmB,GAAnB,mBAAmB,CAAyB;IAC5D,CAAC;IAEJ,KAAK,CAAC,MAAM,CAAC,MAAc,EAAE,GAAiB;QAE5C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAE5D,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,0BAAiB,CAAC,oBAAoB,CAAC,CAAC;QACpD,CAAC;QAGD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAEtE,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,0BAAiB,CAAC,oBAAoB,CAAC,CAAC;QACpD,CAAC;QAGD,IAAI,SAAS,CAAC,UAAU,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QAGD,IAAI,SAAS,CAAC,MAAM,KAAK,uBAAe,CAAC,IAAI,EAAE,CAAC;YAC9C,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;gBACpC,MAAM,EAAE,SAAS,CAAC,UAAU;gBAC5B,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,GAAG,CAAC,IAAI;gBACf,MAAM,EAAE,CAAC;aACV,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,8BAAqB,CAAC,wBAAwB,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;QAGD,SAAS,CAAC,cAAc,EAAE,CAAC;QAC3B,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAG/C,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACjC,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF,CAAA;AAlDY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,iDAA0B,CAAC,CAAA;IAElC,WAAA,IAAA,eAAM,EAAC,6DAAgC,CAAC,CAAA;;GAJhC,oBAAoB,CAkDhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-password.dto.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/change-password.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;IAG5B,eAAe,EAAE,MAAM,CAAC;IASxB,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ChangePasswordDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class ChangePasswordDto {
|
|
15
|
+
currentPassword;
|
|
16
|
+
newPassword;
|
|
17
|
+
}
|
|
18
|
+
exports.ChangePasswordDto = ChangePasswordDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsString)({ message: 'Mật khẩu hiện tại phải là chuỗi' }),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'Mật khẩu hiện tại không được để trống' }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ChangePasswordDto.prototype, "currentPassword", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)({ message: 'Mật khẩu mới phải là chuỗi' }),
|
|
26
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'Mật khẩu mới không được để trống' }),
|
|
27
|
+
(0, class_validator_1.MinLength)(8, { message: 'Mật khẩu mới phải có ít nhất 8 ký tự' }),
|
|
28
|
+
(0, class_validator_1.Matches)(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]/, {
|
|
29
|
+
message: 'Mật khẩu mới phải chứa ít nhất 1 chữ hoa, 1 chữ thường, 1 số và 1 ký tự đặc biệt',
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], ChangePasswordDto.prototype, "newPassword", void 0);
|
|
33
|
+
//# sourceMappingURL=change-password.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-password.dto.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/change-password.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2E;AAE3E,MAAa,iBAAiB;IAG5B,eAAe,CAAS;IASxB,WAAW,CAAS;CACrB;AAbD,8CAaC;AAVC;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,CAAC;IACxD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,uCAAuC,EAAE,CAAC;;0DACzC;AASxB;IAPC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACnD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,kCAAkC,EAAE,CAAC;IAC3D,IAAA,2BAAS,EAAC,CAAC,EAAE,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;IACjE,IAAA,yBAAO,EAAC,iEAAiE,EAAE;QAC1E,OAAO,EACL,kFAAkF;KACrF,CAAC;;sDACkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-credentials.dto.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/client-credentials.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,oBAAoB;IAI/B,UAAU,EAAE,oBAAoB,CAAC;IAIjC,SAAS,EAAE,MAAM,CAAC;IAIlB,aAAa,EAAE,MAAM,CAAC;IAItB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ClientCredentialsDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class ClientCredentialsDto {
|
|
15
|
+
grant_type;
|
|
16
|
+
client_id;
|
|
17
|
+
client_secret;
|
|
18
|
+
scope;
|
|
19
|
+
}
|
|
20
|
+
exports.ClientCredentialsDto = ClientCredentialsDto;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
24
|
+
(0, class_validator_1.IsIn)(['client_credentials']),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ClientCredentialsDto.prototype, "grant_type", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ClientCredentialsDto.prototype, "client_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ClientCredentialsDto.prototype, "client_secret", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
(0, class_validator_1.IsOptional)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], ClientCredentialsDto.prototype, "scope", void 0);
|
|
42
|
+
//# sourceMappingURL=client-credentials.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-credentials.dto.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/client-credentials.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyE;AAEzE,MAAa,oBAAoB;IAI/B,UAAU,CAAuB;IAIjC,SAAS,CAAS;IAIlB,aAAa,CAAS;IAItB,KAAK,CAAU;CAChB;AAjBD,oDAiBC;AAbC;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,sBAAI,EAAC,CAAC,oBAAoB,CAAC,CAAC;;wDACI;AAIjC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACS;AAItB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enable-2fa-response.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/enable-2fa-response.ts"],"names":[],"mappings":"AAAA,qBAAa,iBAAiB;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;gBAEH,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;CAGjD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Enable2FAResponse = void 0;
|
|
4
|
+
class Enable2FAResponse {
|
|
5
|
+
qrCode;
|
|
6
|
+
secret;
|
|
7
|
+
method;
|
|
8
|
+
constructor(partial) {
|
|
9
|
+
Object.assign(this, partial);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.Enable2FAResponse = Enable2FAResponse;
|
|
13
|
+
//# sourceMappingURL=enable-2fa-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enable-2fa-response.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/enable-2fa-response.ts"],"names":[],"mappings":";;;AAAA,MAAa,iBAAiB;IAC5B,MAAM,CAAU;IAChB,MAAM,CAAU;IAChB,MAAM,CAAS;IAEf,YAAY,OAAoC;QAC9C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF;AARD,8CAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enable-2fa.dto.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/enable-2fa.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,YAAY;IAGvB,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Enable2FADto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class Enable2FADto {
|
|
15
|
+
method;
|
|
16
|
+
}
|
|
17
|
+
exports.Enable2FADto = Enable2FADto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)({ message: 'Phương thức 2FA phải là chuỗi' }),
|
|
20
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'Phương thức 2FA không được để trống' }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], Enable2FADto.prototype, "method", void 0);
|
|
23
|
+
//# sourceMappingURL=enable-2fa.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enable-2fa.dto.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/enable-2fa.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,YAAY;IAGvB,MAAM,CAAmB;CAC1B;AAJD,oCAIC;AADC;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC;IACtD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,qCAAqC,EAAE,CAAC;;4CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgot-password.dto.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/forgot-password.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;IAG5B,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ForgotPasswordDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class ForgotPasswordDto {
|
|
15
|
+
email;
|
|
16
|
+
}
|
|
17
|
+
exports.ForgotPasswordDto = ForgotPasswordDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsEmail)({}, { message: 'Email không hợp lệ' }),
|
|
20
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'Email không được để trống' }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], ForgotPasswordDto.prototype, "email", void 0);
|
|
23
|
+
//# sourceMappingURL=forgot-password.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgot-password.dto.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/forgot-password.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsD;AAEtD,MAAa,iBAAiB;IAG5B,KAAK,CAAS;CACf;AAJD,8CAIC;AADC;IAFC,IAAA,yBAAO,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAC9C,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;;gDACvC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './login.dto';
|
|
2
|
+
export * from './register.dto';
|
|
3
|
+
export * from './refresh-token.dto';
|
|
4
|
+
export * from './verify-email.dto';
|
|
5
|
+
export * from './forgot-password.dto';
|
|
6
|
+
export * from './reset-password.dto';
|
|
7
|
+
export * from './change-password.dto';
|
|
8
|
+
export * from './update-profile.dto';
|
|
9
|
+
export * from './enable-2fa.dto';
|
|
10
|
+
export * from './verify-2fa.dto';
|
|
11
|
+
export * from './social-login.dto';
|
|
12
|
+
export * from './client-credentials.dto';
|
|
13
|
+
export * from './login-response';
|
|
14
|
+
export * from './token-response';
|
|
15
|
+
export * from './user-response';
|
|
16
|
+
export * from './enable-2fa-response';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./login.dto"), exports);
|
|
18
|
+
__exportStar(require("./register.dto"), exports);
|
|
19
|
+
__exportStar(require("./refresh-token.dto"), exports);
|
|
20
|
+
__exportStar(require("./verify-email.dto"), exports);
|
|
21
|
+
__exportStar(require("./forgot-password.dto"), exports);
|
|
22
|
+
__exportStar(require("./reset-password.dto"), exports);
|
|
23
|
+
__exportStar(require("./change-password.dto"), exports);
|
|
24
|
+
__exportStar(require("./update-profile.dto"), exports);
|
|
25
|
+
__exportStar(require("./enable-2fa.dto"), exports);
|
|
26
|
+
__exportStar(require("./verify-2fa.dto"), exports);
|
|
27
|
+
__exportStar(require("./social-login.dto"), exports);
|
|
28
|
+
__exportStar(require("./client-credentials.dto"), exports);
|
|
29
|
+
__exportStar(require("./login-response"), exports);
|
|
30
|
+
__exportStar(require("./token-response"), exports);
|
|
31
|
+
__exportStar(require("./user-response"), exports);
|
|
32
|
+
__exportStar(require("./enable-2fa-response"), exports);
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,8CAA4B;AAC5B,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,wDAAsC;AACtC,uDAAqC;AACrC,wDAAsC;AACtC,uDAAqC;AACrC,mDAAiC;AACjC,mDAAiC;AACjC,qDAAmC;AACnC,2DAAyC;AAGzC,mDAAiC;AACjC,mDAAiC;AACjC,kDAAgC;AAChC,wDAAsC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AuthUserStatus } from "../../domain/enums";
|
|
2
|
+
export declare class LoginResponse {
|
|
3
|
+
accessToken: string;
|
|
4
|
+
refreshToken: string;
|
|
5
|
+
expiresIn: number;
|
|
6
|
+
tokenType: string;
|
|
7
|
+
user: {
|
|
8
|
+
id: number;
|
|
9
|
+
email: string;
|
|
10
|
+
username?: string;
|
|
11
|
+
displayName?: string;
|
|
12
|
+
avatar?: string;
|
|
13
|
+
emailVerified: boolean;
|
|
14
|
+
emailVerifiedAt?: Date;
|
|
15
|
+
status?: AuthUserStatus;
|
|
16
|
+
lastLoginAt?: Date;
|
|
17
|
+
twoFactorEnabled: boolean;
|
|
18
|
+
createdAt?: Date;
|
|
19
|
+
updatedAt?: Date;
|
|
20
|
+
roles: string[];
|
|
21
|
+
permissions: string[];
|
|
22
|
+
};
|
|
23
|
+
constructor(partial?: Partial<LoginResponse>);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=login-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login-response.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/login-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,qBAAa,aAAa;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,OAAO,CAAC;QACvB,eAAe,CAAC,EAAE,IAAI,CAAC;QACvB,MAAM,CAAC,EAAE,cAAc,CAAC;QACxB,WAAW,CAAC,EAAE,IAAI,CAAC;QACnB,gBAAgB,EAAE,OAAO,CAAC;QAC1B,SAAS,CAAC,EAAE,IAAI,CAAC;QACjB,SAAS,CAAC,EAAE,IAAI,CAAC;QACjB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,WAAW,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;gBAGU,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC;CAG7C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoginResponse = void 0;
|
|
4
|
+
class LoginResponse {
|
|
5
|
+
accessToken;
|
|
6
|
+
refreshToken;
|
|
7
|
+
expiresIn;
|
|
8
|
+
tokenType;
|
|
9
|
+
user;
|
|
10
|
+
constructor(partial) {
|
|
11
|
+
Object.assign(this, partial);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.LoginResponse = LoginResponse;
|
|
15
|
+
//# sourceMappingURL=login-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login-response.js","sourceRoot":"","sources":["../../../../../src/server/auth/application/dto/login-response.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IACxB,WAAW,CAAS;IACpB,YAAY,CAAS;IACrB,SAAS,CAAS;IAClB,SAAS,CAAS;IAClB,IAAI,CAeF;IAGF,YAAY,OAAgC;QAC1C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF;AA1BD,sCA0BC"}
|