@my-nestjs-kit/auth 0.0.0-stage → 0.1.0-dev.20261129020438

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.
Files changed (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -2
  3. package/dist/access-tokens/access-token.d.ts +13 -0
  4. package/dist/access-tokens/access-token.js +10 -0
  5. package/dist/access-tokens/access-tokens.module.d.ts +2 -0
  6. package/dist/access-tokens/access-tokens.module.js +22 -0
  7. package/dist/access-tokens/access-tokens.service.d.ts +16 -0
  8. package/dist/access-tokens/access-tokens.service.js +72 -0
  9. package/dist/access-tokens/access-tokens.types.d.ts +5 -0
  10. package/dist/access-tokens/access-tokens.types.js +9 -0
  11. package/dist/access-tokens/dto/access-token.dto.d.ts +13 -0
  12. package/dist/access-tokens/dto/access-token.dto.js +33 -0
  13. package/dist/auth-sessions/devices/dto/create-device.dto.d.ts +6 -0
  14. package/dist/auth-sessions/devices/dto/create-device.dto.js +33 -0
  15. package/dist/auth-sessions/dto/create-auth-session.dto.d.ts +8 -0
  16. package/dist/auth-sessions/dto/create-auth-session.dto.js +36 -0
  17. package/dist/auth.constants.d.ts +30 -0
  18. package/dist/auth.constants.js +36 -0
  19. package/dist/decorators/GetAuthParams.decorator.d.ts +34 -0
  20. package/dist/decorators/GetAuthParams.decorator.js +64 -0
  21. package/dist/decorators/GetSession.decorator.d.ts +2 -0
  22. package/dist/decorators/GetSession.decorator.js +13 -0
  23. package/dist/decorators/GetUser.decorator.d.ts +2 -0
  24. package/dist/decorators/GetUser.decorator.js +13 -0
  25. package/dist/decorators/Public.decorator.d.ts +3 -0
  26. package/dist/decorators/Public.decorator.js +18 -0
  27. package/dist/decorators/SetAuthConfig.decorator.d.ts +3 -0
  28. package/dist/decorators/SetAuthConfig.decorator.js +13 -0
  29. package/dist/dto/confirm-secure-action.dto.d.ts +8 -0
  30. package/dist/dto/confirm-secure-action.dto.js +46 -0
  31. package/dist/dto/log-in-by-email.dto.d.ts +16 -0
  32. package/dist/dto/log-in-by-email.dto.js +15 -0
  33. package/dist/dto/login-user-auth.dto.d.ts +4 -0
  34. package/dist/dto/login-user-auth.dto.js +29 -0
  35. package/dist/dto/verify-user-registration.dto.d.ts +4 -0
  36. package/dist/dto/verify-user-registration.dto.js +25 -0
  37. package/dist/entities/abstract-device-base.entity.d.ts +10 -0
  38. package/dist/entities/abstract-device-base.entity.js +77 -0
  39. package/dist/entities/abstract-o-auth-connection.entity.d.ts +28 -0
  40. package/dist/entities/abstract-o-auth-connection.entity.js +100 -0
  41. package/dist/entities/abstract-o-auth-profile.entity.d.ts +10 -0
  42. package/dist/entities/abstract-o-auth-profile.entity.js +38 -0
  43. package/dist/entities/auth-session-base.entity.d.ts +18 -0
  44. package/dist/entities/auth-session-base.entity.js +73 -0
  45. package/dist/guards/AbstractRefreshJwtToken.guard.d.ts +9 -0
  46. package/dist/guards/AbstractRefreshJwtToken.guard.js +45 -0
  47. package/dist/guards/abstract/AppAuthGuard-abstract.d.ts +219 -0
  48. package/dist/guards/abstract/AppAuthGuard-abstract.js +187 -0
  49. package/dist/guards/index.d.ts +0 -0
  50. package/dist/guards/index.js +0 -0
  51. package/dist/helper/base-auth-service.helper.d.ts +60 -0
  52. package/dist/helper/base-auth-service.helper.js +184 -0
  53. package/dist/helper/jsw-auth-controller-abstract.d.ts +33 -0
  54. package/dist/helper/jsw-auth-controller-abstract.js +89 -0
  55. package/dist/helper/jwt-auth-service-abstract.d.ts +40 -0
  56. package/dist/helper/jwt-auth-service-abstract.js +181 -0
  57. package/dist/index.d.ts +31 -0
  58. package/dist/index.js +55 -0
  59. package/dist/jwt/index.d.ts +5 -0
  60. package/dist/jwt/index.js +21 -0
  61. package/dist/jwt/jwt-auth.module.d.ts +6 -0
  62. package/dist/jwt/jwt-auth.module.js +45 -0
  63. package/dist/jwt/jwt-auth.service.d.ts +33 -0
  64. package/dist/jwt/jwt-auth.service.js +170 -0
  65. package/dist/jwt/jwt-keys.helper.d.ts +12 -0
  66. package/dist/jwt/jwt-keys.helper.js +32 -0
  67. package/dist/jwt/types/enums.d.ts +19 -0
  68. package/dist/jwt/types/enums.js +26 -0
  69. package/dist/jwt/types/index.d.ts +2 -0
  70. package/dist/jwt/types/index.js +18 -0
  71. package/dist/jwt/types/jwt-auth.types.d.ts +44 -0
  72. package/dist/jwt/types/jwt-auth.types.js +2 -0
  73. package/dist/o-auth/abstract-o-auth.service.d.ts +30 -0
  74. package/dist/o-auth/abstract-o-auth.service.js +64 -0
  75. package/dist/o-auth/o-auth.namespace.d.ts +131 -0
  76. package/dist/o-auth/o-auth.namespace.js +256 -0
  77. package/dist/o-auth/sdk/base-ext-o-auth-sdk.d.ts +104 -0
  78. package/dist/o-auth/sdk/base-ext-o-auth-sdk.js +56 -0
  79. package/dist/route-auth-configs.helper.d.ts +29 -0
  80. package/dist/route-auth-configs.helper.js +36 -0
  81. package/dist/services/abstrac-auth-sessions.service.d.ts +28 -0
  82. package/dist/services/abstrac-auth-sessions.service.js +41 -0
  83. package/dist/services/abstract-sessions-repo.service.d.ts +28 -0
  84. package/dist/services/abstract-sessions-repo.service.js +28 -0
  85. package/dist/types/app-request.inteface.d.ts +14 -0
  86. package/dist/types/app-request.inteface.js +2 -0
  87. package/dist/types/auth.types.d.ts +43 -0
  88. package/dist/types/auth.types.js +12 -0
  89. package/dist/types/ws-client.types.d.ts +14 -0
  90. package/dist/types/ws-client.types.js +2 -0
  91. package/package.json +95 -3
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthTokenType = void 0;
4
+ // Route auth configuration (SetAuthConfig) and the request auth context.
5
+ // ERP-specific request shapes (user/customer/permission entities) stay in the ERP and extend these.
6
+ var AuthTokenType;
7
+ (function (AuthTokenType) {
8
+ AuthTokenType["pToken"] = "pToken";
9
+ AuthTokenType["xToken"] = "xToken";
10
+ AuthTokenType["jwtErp"] = "jwtErp";
11
+ AuthTokenType["jwtCrm"] = "jwtCrm";
12
+ })(AuthTokenType || (exports.AuthTokenType = AuthTokenType = {}));
@@ -0,0 +1,14 @@
1
+ import type { ErpRequestTarget } from './app-request.inteface';
2
+ import type { AppCookies } from '@my-nestjs-kit/core';
3
+ export declare namespace AppWs {
4
+ interface Client extends ErpRequestTarget {
5
+ id?: string;
6
+ cookies?: AppCookies;
7
+ handshake?: {
8
+ headers?: Record<string, any>;
9
+ query?: Record<string, any>;
10
+ auth?: Record<string, any>;
11
+ };
12
+ data?: Record<string, any>;
13
+ }
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,98 @@
1
1
  {
2
2
  "name": "@my-nestjs-kit/auth",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0-dev.20261129020438",
4
+ "description": "NestJS auth bases: JWT engine with key rotation, auth and session service bases, OAuth bases, guard bases, route auth config and request auth decorators, access tokens.",
5
+ "keywords": [
6
+ "nestjs",
7
+ "nest",
8
+ "jwt",
9
+ "auth",
10
+ "guards",
11
+ "oauth"
12
+ ],
13
+ "license": "MIT",
14
+ "homepage": "https://github.com/sabationok/my-nestjs-kit/tree/main/packages/auth#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/sabationok/my-nestjs-kit/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/sabationok/my-nestjs-kit.git",
21
+ "directory": "packages/auth"
22
+ },
23
+ "engines": {
24
+ "node": ">=18"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "main": "dist/index.js",
30
+ "types": "dist/index.d.ts",
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/index.d.ts",
34
+ "require": "./dist/index.js",
35
+ "default": "./dist/index.js"
36
+ },
37
+ "./package.json": "./package.json"
38
+ },
39
+ "files": [
40
+ "dist",
41
+ "!dist/**/*.spec.*",
42
+ "!dist/**/*.tsbuildinfo",
43
+ "README.md",
44
+ "LICENSE"
45
+ ],
46
+ "dependencies": {
47
+ "@my-nestjs-kit/core": "^0.1.0-dev.20261129020438",
48
+ "nanoid": "^3.3.7"
49
+ },
50
+ "peerDependencies": {
51
+ "@nestjs/common": "^10.4.1",
52
+ "@nestjs/core": "^10.4.1",
53
+ "@nestjs/swagger": "^7.4.0",
54
+ "@types/express": "^4.17.0 || ^5.0.0",
55
+ "axios": "^1.7.5",
56
+ "bcryptjs": "^2.4.3",
57
+ "class-validator": "^0.14.1",
58
+ "date-fns": "^3.5.0",
59
+ "jsonwebtoken": "^9.0.0",
60
+ "lodash": "^4.17.21",
61
+ "rxjs": "^7.8.1",
62
+ "typeorm": "^0.3.28"
63
+ },
64
+ "peerDependenciesMeta": {
65
+ "@types/express": {
66
+ "optional": true
67
+ }
68
+ },
69
+ "devDependencies": {
70
+ "@nestjs/common": "10.4.20",
71
+ "@nestjs/core": "10.4.1",
72
+ "@nestjs/swagger": "7.4.0",
73
+ "@nestjs/websockets": "10.4.1",
74
+ "@types/bcryptjs": "2.4.6",
75
+ "@types/express": "4.17.21",
76
+ "@types/jsonwebtoken": "9.0.5",
77
+ "@types/lodash": "4.17.0",
78
+ "@types/node": "20.11.28",
79
+ "axios": "1.13.2",
80
+ "bcryptjs": "2.4.3",
81
+ "class-transformer": "0.5.1",
82
+ "class-validator": "0.14.1",
83
+ "date-fns": "3.5.0",
84
+ "decimal.js": "10.4.3",
85
+ "ioredis": "5.8.2",
86
+ "jsonwebtoken": "9.0.2",
87
+ "lodash": "4.17.21",
88
+ "reflect-metadata": "0.2.2",
89
+ "rxjs": "7.8.1",
90
+ "typeorm": "0.3.28",
91
+ "typescript": "5.4.2"
92
+ },
93
+ "scripts": {
94
+ "build": "rm -rf dist && tsc -p tsconfig.json",
95
+ "build:watch": "tsc -p tsconfig.json --watch",
96
+ "typecheck": "tsc -p tsconfig.json --noEmit"
97
+ }
6
98
  }