xiongzhu 2 lat temu
rodzic
commit
46709656f7
55 zmienionych plików z 3394 dodań i 1157 usunięć
  1. 3128 0
      graph.json
  2. 5 0
      package.json
  3. 1 3
      src/aliyun/aliyun.module.ts
  4. 0 4
      src/app.controller.ts
  5. 9 4
      src/app.module.ts
  6. 18 0
      src/auth/auth.controller.spec.ts
  7. 17 0
      src/auth/auth.controller.ts
  8. 25 0
      src/auth/auth.module.ts
  9. 18 0
      src/auth/auth.service.spec.ts
  10. 21 0
      src/auth/auth.service.ts
  11. 11 0
      src/auth/dto/login.dto.ts
  12. 22 0
      src/auth/jwt-auth.guard.ts
  13. 0 0
      src/auth/jwt.config.ts
  14. 27 0
      src/auth/jwt.strategy.ts
  15. 4 0
      src/auth/public.decorator.ts
  16. 0 55
      src/iam/change-password/change-password.controller.spec.ts
  17. 0 27
      src/iam/change-password/change-password.controller.ts
  18. 0 35
      src/iam/change-password/change-password.module.ts
  19. 0 70
      src/iam/change-password/change-password.service.spec.ts
  20. 0 35
      src/iam/change-password/change-password.service.ts
  21. 0 4
      src/iam/change-password/dto/change-password.dto.ts
  22. 0 4
      src/iam/forgot-password/dto/forgot-password.dto.ts
  23. 0 53
      src/iam/forgot-password/forgot-password.controller.spec.ts
  24. 0 27
      src/iam/forgot-password/forgot-password.controller.ts
  25. 0 24
      src/iam/forgot-password/forgot-password.module.ts
  26. 0 83
      src/iam/forgot-password/forgot-password.service.spec.ts
  27. 0 50
      src/iam/forgot-password/forgot-password.service.ts
  28. 0 2
      src/iam/iam.constants.ts
  29. 0 14
      src/iam/iam.module.ts
  30. 0 6
      src/iam/login/decorators/auth-guard.decorator.ts
  31. 0 4
      src/iam/login/dto/login.dto.ts
  32. 0 4
      src/iam/login/enums/auth-type.enum.ts
  33. 0 36
      src/iam/login/guards/access-token/access-token.guard.ts
  34. 0 36
      src/iam/login/guards/authentication/authentication.guard.ts
  35. 0 5
      src/iam/login/interfaces/jwt-payload.interface.ts
  36. 0 51
      src/iam/login/login.controller.spec.ts
  37. 0 18
      src/iam/login/login.controller.ts
  38. 0 37
      src/iam/login/login.module.ts
  39. 0 129
      src/iam/login/login.service.spec.ts
  40. 0 58
      src/iam/login/login.service.ts
  41. 0 3
      src/iam/register/dto/register-user.dto.ts
  42. 0 81
      src/iam/register/register.controller.spec.ts
  43. 0 27
      src/iam/register/register.controller.ts
  44. 0 23
      src/iam/register/register.module.ts
  45. 0 80
      src/iam/register/register.service.spec.ts
  46. 0 43
      src/iam/register/register.service.ts
  47. 12 5
      src/main.ts
  48. 4 0
      src/model/role.enum.ts
  49. 3 3
      src/sms/sms.controller.ts
  50. 2 2
      src/sms/sms.module.ts
  51. 4 0
      src/users/entities/users.entity.ts
  52. 7 4
      src/users/users.controller.ts
  53. 4 4
      src/users/users.module.ts
  54. 2 1
      src/users/users.service.ts
  55. 50 3
      yarn.lock

+ 3128 - 0
graph.json

@@ -0,0 +1,3128 @@
+{
+  "nodes": {
+    "1896425": {
+      "id": "1896425",
+      "label": "CONFIGURABLE_MODULE_OPTIONS[e3b5c74eafc7706f6332f]",
+      "parent": "-1033621697",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "DevtoolsModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "CONFIGURABLE_MODULE_OPTIONS[e3b5c74eafc7706f6332f]"
+      }
+    },
+    "95355232": {
+      "id": "95355232",
+      "label": "JwtModule",
+      "parent": "-536515674",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "JwtModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "JwtModule",
+        "initTime": 1.6359999999403954
+      }
+    },
+    "203550704": {
+      "id": "203550704",
+      "label": "ExternalContextCreator",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": true,
+        "token": "ExternalContextCreator"
+      }
+    },
+    "211572259": {
+      "id": "211572259",
+      "label": "ConfigHostModule",
+      "metadata": {
+        "type": "module",
+        "global": true,
+        "dynamic": false,
+        "internal": false
+      }
+    },
+    "225063248": {
+      "id": "225063248",
+      "label": "InternalCoreModule",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "InternalCoreModule",
+        "initTime": 3.4108339995145798
+      }
+    },
+    "233936880": {
+      "id": "233936880",
+      "label": "AppController",
+      "parent": "-19112576",
+      "metadata": {
+        "type": "controller",
+        "internal": false,
+        "sourceModuleName": "AppModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "AppController"
+      }
+    },
+    "266839889": {
+      "id": "266839889",
+      "label": "EntityManager",
+      "parent": "-1026304274",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "TypeOrmCoreModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "EntityManager"
+      }
+    },
+    "303302557": {
+      "id": "303302557",
+      "label": "ModuleRef",
+      "parent": "211572259",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigHostModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "373235992": {
+      "id": "373235992",
+      "label": "SandboxedCodeExecutor",
+      "parent": "-1033621697",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "DevtoolsModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "SandboxedCodeExecutor",
+        "initTime": 3.8920830003917217
+      }
+    },
+    "385041166": {
+      "id": "385041166",
+      "label": "JwtStrategy",
+      "parent": "-1134487807",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "AuthModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "JwtStrategy",
+        "initTime": 2.7962500005960464
+      }
+    },
+    "400681591": {
+      "id": "400681591",
+      "label": "DiscoveryService",
+      "parent": "-643397745",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "DiscoveryModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "DiscoveryService",
+        "initTime": 3.4103749990463257
+      }
+    },
+    "457665600": {
+      "id": "457665600",
+      "label": "AliyunModule",
+      "parent": "612499341",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "AliyunModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "AliyunModule",
+        "initTime": 2.057250000536442
+      }
+    },
+    "545846241": {
+      "id": "545846241",
+      "label": "TypeOrmModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": true,
+        "internal": false
+      }
+    },
+    "545846242": {
+      "id": "545846242",
+      "label": "TypeOrmModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": true,
+        "internal": false
+      }
+    },
+    "555176277": {
+      "id": "555176277",
+      "label": "InternalCoreModule",
+      "metadata": {
+        "type": "module",
+        "global": true,
+        "dynamic": true,
+        "internal": true
+      }
+    },
+    "590446087": {
+      "id": "590446087",
+      "label": "ModuleRef",
+      "parent": "612499341",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "AliyunModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "603011239": {
+      "id": "603011239",
+      "label": "UsersService",
+      "parent": "-2003726489",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "UsersModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "UsersService"
+      }
+    },
+    "612499341": {
+      "id": "612499341",
+      "label": "AliyunModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": false,
+        "internal": false
+      }
+    },
+    "671882984": {
+      "id": "671882984",
+      "label": "Reflector",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "Reflector",
+        "initTime": 3.328958000987768
+      }
+    },
+    "687352615": {
+      "id": "687352615",
+      "label": "ModuleRef",
+      "parent": "545846241",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "687352616": {
+      "id": "687352616",
+      "label": "ModuleRef",
+      "parent": "545846242",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "712454178": {
+      "id": "712454178",
+      "label": "ApplicationConfig",
+      "parent": "1482218087",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ThrottlerModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "731684192": {
+      "id": "731684192",
+      "label": "TypeOrmCoreModule",
+      "parent": "-1026304274",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "TypeOrmCoreModule"
+      }
+    },
+    "863216333": {
+      "id": "863216333",
+      "label": "ConfigModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": false,
+        "internal": false
+      }
+    },
+    "863216334": {
+      "id": "863216334",
+      "label": "ConfigModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": true,
+        "internal": false
+      }
+    },
+    "863216335": {
+      "id": "863216335",
+      "label": "ConfigModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": true,
+        "internal": false
+      }
+    },
+    "915774976": {
+      "id": "915774976",
+      "label": "ApplicationConfig",
+      "parent": "1712628187",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "930519593": {
+      "id": "930519593",
+      "label": "ConfigService",
+      "parent": "211572259",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ConfigHostModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "Symbol(CONFIG_SERVICE)",
+        "initTime": 3.3957500010728836
+      }
+    },
+    "1014874916": {
+      "id": "1014874916",
+      "label": "TypeOrmModuleId",
+      "parent": "-1026304274",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "TypeOrmCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "TypeOrmModuleId"
+      }
+    },
+    "1063746662": {
+      "id": "1063746662",
+      "label": "CONFIGURATION_TOKEN",
+      "parent": "211572259",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ConfigHostModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "CONFIGURATION_TOKEN",
+        "initTime": 2.513374999165535
+      }
+    },
+    "1070370213": {
+      "id": "1070370213",
+      "label": "JwtService",
+      "parent": "-536515674",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "JwtModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "JwtService"
+      }
+    },
+    "1144875719": {
+      "id": "1144875719",
+      "label": "ModuleRef",
+      "parent": "863216333",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "1144875720": {
+      "id": "1144875720",
+      "label": "ModuleRef",
+      "parent": "863216334",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "1144875721": {
+      "id": "1144875721",
+      "label": "ModuleRef",
+      "parent": "863216335",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "1259084392": {
+      "id": "1259084392",
+      "label": "SmsRecordRepository",
+      "parent": "545846241",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "TypeOrmModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "SmsRecordRepository"
+      }
+    },
+    "1310883338": {
+      "id": "1310883338",
+      "label": "CONFIGURATION_LOADER",
+      "parent": "863216334",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "CONFIGURATION_LOADER",
+        "initTime": 3.1135830003768206
+      }
+    },
+    "1333473084": {
+      "id": "1333473084",
+      "label": "CONFIGURATION_LOADER",
+      "parent": "863216335",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "CONFIGURATION_LOADER",
+        "initTime": 2.746875001117587
+      }
+    },
+    "1399306624": {
+      "id": "1399306624",
+      "label": "ThrottlerModule",
+      "parent": "1482218087",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ThrottlerModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ThrottlerModule",
+        "initTime": 2.509375000372529
+      }
+    },
+    "1434456218": {
+      "id": "1434456218",
+      "label": "Reflector",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": true,
+        "token": "Reflector",
+        "initTime": 4.259875001385808
+      }
+    },
+    "1475573941": {
+      "id": "1475573941",
+      "label": "ModuleRef",
+      "parent": "-2135742481",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "1482218087": {
+      "id": "1482218087",
+      "label": "ThrottlerModule",
+      "metadata": {
+        "type": "module",
+        "global": true,
+        "dynamic": true,
+        "internal": false
+      }
+    },
+    "1489982643": {
+      "id": "1489982643",
+      "label": "ApplicationConfig",
+      "parent": "-759474504",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "SmsModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "1529900285": {
+      "id": "1529900285",
+      "label": "Connection",
+      "parent": "-1026304274",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "TypeOrmCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": true,
+        "token": "Connection"
+      }
+    },
+    "1542581243": {
+      "id": "1542581243",
+      "label": "ModuleRef",
+      "parent": "-1134487807",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "AuthModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "1623724461": {
+      "id": "1623724461",
+      "label": "ModuleRef",
+      "parent": "1482218087",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ThrottlerModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "1688619051": {
+      "id": "1688619051",
+      "label": "DevtoolsHttpServerHost",
+      "parent": "-1033621697",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "DevtoolsModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "DevtoolsHttpServerHost"
+      }
+    },
+    "1690574933": {
+      "id": "1690574933",
+      "label": "ModuleRef",
+      "parent": "1712628187",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "1705191969": {
+      "id": "1705191969",
+      "label": "AliyunService",
+      "parent": "612499341",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "AliyunModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "AliyunService",
+        "initTime": 3.175374999642372
+      }
+    },
+    "1712628187": {
+      "id": "1712628187",
+      "label": "ConfigModule",
+      "metadata": {
+        "type": "module",
+        "global": true,
+        "dynamic": true,
+        "internal": false
+      }
+    },
+    "1712941473": {
+      "id": "1712941473",
+      "label": "ApplicationConfig",
+      "parent": "-536515674",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "JwtModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "1769319388": {
+      "id": "1769319388",
+      "label": "ConfigModule",
+      "parent": "1712628187",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ConfigModule",
+        "initTime": 2.5859999991953373
+      }
+    },
+    "1787828844": {
+      "id": "1787828844",
+      "label": "ConfigHostModule",
+      "parent": "211572259",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigHostModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ConfigHostModule",
+        "initTime": 2.4677920006215572
+      }
+    },
+    "1817334964": {
+      "id": "1817334964",
+      "label": "ModuleRef",
+      "parent": "-1026304274",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "1864578377": {
+      "id": "1864578377",
+      "label": "SmsService",
+      "parent": "-759474504",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "SmsModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "SmsService"
+      }
+    },
+    "1919157847": {
+      "id": "1919157847",
+      "label": "REQUEST",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": false,
+        "scope": 2,
+        "transient": false,
+        "exported": true,
+        "token": "REQUEST",
+        "initTime": 2.7724580001085997
+      }
+    },
+    "1989588516": {
+      "id": "1989588516",
+      "label": "ApplicationConfig",
+      "parent": "-1033621697",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "DevtoolsModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "2075644217": {
+      "id": "2075644217",
+      "label": "TypeOrmModuleOptions",
+      "parent": "-1026304274",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "TypeOrmCoreModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "TypeOrmModuleOptions"
+      }
+    },
+    "2118694856": {
+      "id": "2118694856",
+      "label": "ApplicationConfig",
+      "parent": "211572259",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigHostModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-1486320561": {
+      "id": "-1486320561",
+      "label": "ModuleRef",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "-651043398": {
+      "id": "-651043398",
+      "label": "ApplicationConfig",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-255469305": {
+      "id": "-255469305",
+      "label": "INQUIRER",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 1,
+        "transient": true,
+        "exported": true,
+        "token": "INQUIRER",
+        "initTime": 2.7693750001490116
+      }
+    },
+    "-26938366": {
+      "id": "-26938366",
+      "label": "ModulesContainer",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": true,
+        "token": "ModulesContainer"
+      }
+    },
+    "-326832201": {
+      "id": "-326832201",
+      "label": "HttpAdapterHost",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": true,
+        "token": "HttpAdapterHost"
+      }
+    },
+    "-553129559": {
+      "id": "-553129559",
+      "label": "HttpAdapterHost",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": true,
+        "token": "HttpAdapterHost",
+        "initTime": 3.492375001311302
+      }
+    },
+    "-702581189": {
+      "id": "-702581189",
+      "label": "LazyModuleLoader",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "LazyModuleLoader",
+        "initTime": 2.9976249989122152
+      }
+    },
+    "-1904419534": {
+      "id": "-1904419534",
+      "label": "SerializedGraph",
+      "parent": "555176277",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "InternalCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": true,
+        "token": "SerializedGraph"
+      }
+    },
+    "-19112576": {
+      "id": "-19112576",
+      "label": "AppModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": false,
+        "internal": false
+      }
+    },
+    "-2139588960": {
+      "id": "-2139588960",
+      "label": "AppModule",
+      "parent": "-19112576",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "AppModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "AppModule",
+        "initTime": 2.988874999806285
+      }
+    },
+    "-71302842": {
+      "id": "-71302842",
+      "label": "ModuleRef",
+      "parent": "-19112576",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "AppModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "-2064622725": {
+      "id": "-2064622725",
+      "label": "ApplicationConfig",
+      "parent": "-19112576",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "AppModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-2130614055": {
+      "id": "-2130614055",
+      "label": "AppService",
+      "parent": "-19112576",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "AppModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "AppService",
+        "initTime": 2.9747499991208315
+      }
+    },
+    "-1033621697": {
+      "id": "-1033621697",
+      "label": "DevtoolsModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": true,
+        "internal": false
+      }
+    },
+    "-1142553948": {
+      "id": "-1142553948",
+      "label": "DevtoolsModule",
+      "parent": "-1033621697",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "DevtoolsModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "DevtoolsModule",
+        "initTime": 2.8990000002086163
+      }
+    },
+    "-751962311": {
+      "id": "-751962311",
+      "label": "ModuleRef",
+      "parent": "-1033621697",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "DevtoolsModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "-643397745": {
+      "id": "-643397745",
+      "label": "DiscoveryModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": false,
+        "internal": false
+      }
+    },
+    "-1048394624": {
+      "id": "-1048394624",
+      "label": "DiscoveryModule",
+      "parent": "-643397745",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "DiscoveryModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "DiscoveryModule",
+        "initTime": 2.6720000002533197
+      }
+    },
+    "-501891371": {
+      "id": "-501891371",
+      "label": "ModuleRef",
+      "parent": "-643397745",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "DiscoveryModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "-1413161654": {
+      "id": "-1413161654",
+      "label": "ApplicationConfig",
+      "parent": "-643397745",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "DiscoveryModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-438112115": {
+      "id": "-438112115",
+      "label": "MetadataScanner",
+      "parent": "-643397745",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "DiscoveryModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "MetadataScanner",
+        "initTime": 2.6850419994443655
+      }
+    },
+    "-503631789": {
+      "id": "-503631789",
+      "label": "ConfigService",
+      "parent": "1712628187",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "ConfigService"
+      }
+    },
+    "-1952648617": {
+      "id": "-1952648617",
+      "label": "THROTTLER:MODULE_OPTIONS",
+      "parent": "1482218087",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ThrottlerModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "THROTTLER:MODULE_OPTIONS"
+      }
+    },
+    "-470986226": {
+      "id": "-470986226",
+      "label": "Symbol(ThrottlerStorage)",
+      "parent": "1482218087",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ThrottlerModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "Symbol(ThrottlerStorage)"
+      }
+    },
+    "-491114354": {
+      "id": "-491114354",
+      "label": "ConfigModule",
+      "parent": "863216333",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ConfigModule",
+        "initTime": 2.2957079987972975
+      }
+    },
+    "-408540750": {
+      "id": "-408540750",
+      "label": "ApplicationConfig",
+      "parent": "863216333",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-503631788": {
+      "id": "-503631788",
+      "label": "ConfigService",
+      "parent": "863216333",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": true,
+        "token": "ConfigService"
+      }
+    },
+    "-2135742481": {
+      "id": "-2135742481",
+      "label": "TypeOrmModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": true,
+        "internal": false
+      }
+    },
+    "-1872891520": {
+      "id": "-1872891520",
+      "label": "TypeOrmModule",
+      "parent": "-2135742481",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "TypeOrmModule",
+        "initTime": 2.2676250003278255
+      }
+    },
+    "-1068388246": {
+      "id": "-1068388246",
+      "label": "ApplicationConfig",
+      "parent": "-2135742481",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-1026304274": {
+      "id": "-1026304274",
+      "label": "TypeOrmCoreModule",
+      "metadata": {
+        "type": "module",
+        "global": true,
+        "dynamic": true,
+        "internal": false
+      }
+    },
+    "-2035045911": {
+      "id": "-2035045911",
+      "label": "ApplicationConfig",
+      "parent": "-1026304274",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmCoreModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-2103415210": {
+      "id": "-2103415210",
+      "label": "DataSource",
+      "parent": "-1026304274",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "TypeOrmCoreModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "DataSource"
+      }
+    },
+    "-184353870": {
+      "id": "-184353870",
+      "label": "ApplicationConfig",
+      "parent": "612499341",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "AliyunModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-491114353": {
+      "id": "-491114353",
+      "label": "ConfigModule",
+      "parent": "863216334",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ConfigModule",
+        "initTime": 2.023207999765873
+      }
+    },
+    "-408540749": {
+      "id": "-408540749",
+      "label": "ApplicationConfig",
+      "parent": "863216334",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-503631786": {
+      "id": "-503631786",
+      "label": "ConfigService",
+      "parent": "863216334",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "ConfigService"
+      }
+    },
+    "-1790226991": {
+      "id": "-1790226991",
+      "label": "CONFIGURATION(aliyun)",
+      "parent": "863216334",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "CONFIGURATION(aliyun)",
+        "initTime": 2.0314589999616146
+      }
+    },
+    "-759474504": {
+      "id": "-759474504",
+      "label": "SmsModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": false,
+        "internal": false
+      }
+    },
+    "-648981088": {
+      "id": "-648981088",
+      "label": "SmsModule",
+      "parent": "-759474504",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "SmsModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "SmsModule",
+        "initTime": 1.9737909995019436
+      }
+    },
+    "-811664770": {
+      "id": "-811664770",
+      "label": "ModuleRef",
+      "parent": "-759474504",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "SmsModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "-397258000": {
+      "id": "-397258000",
+      "label": "SmsController",
+      "parent": "-759474504",
+      "metadata": {
+        "type": "controller",
+        "internal": false,
+        "sourceModuleName": "SmsModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "SmsController"
+      }
+    },
+    "-257450702": {
+      "id": "-257450702",
+      "label": "TypeOrmModule",
+      "parent": "545846241",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "TypeOrmModule",
+        "initTime": 1.7841250002384186
+      }
+    },
+    "-223917668": {
+      "id": "-223917668",
+      "label": "ApplicationConfig",
+      "parent": "545846241",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-2003726489": {
+      "id": "-2003726489",
+      "label": "UsersModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": false,
+        "internal": false
+      }
+    },
+    "-495603840": {
+      "id": "-495603840",
+      "label": "UsersModule",
+      "parent": "-2003726489",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "UsersModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "UsersModule",
+        "initTime": 1.7735830005258322
+      }
+    },
+    "-618964563": {
+      "id": "-618964563",
+      "label": "ModuleRef",
+      "parent": "-2003726489",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "UsersModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "-643958110": {
+      "id": "-643958110",
+      "label": "ApplicationConfig",
+      "parent": "-2003726489",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "UsersModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-1629317077": {
+      "id": "-1629317077",
+      "label": "BcryptService",
+      "parent": "-2003726489",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "UsersModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "HashingService",
+        "initTime": 1.7639589998871088
+      }
+    },
+    "-1102473136": {
+      "id": "-1102473136",
+      "label": "UsersController",
+      "parent": "-2003726489",
+      "metadata": {
+        "type": "controller",
+        "internal": false,
+        "sourceModuleName": "UsersModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "UsersController"
+      }
+    },
+    "-257450701": {
+      "id": "-257450701",
+      "label": "TypeOrmModule",
+      "parent": "545846242",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "TypeOrmModule",
+        "initTime": 1.7342910002917051
+      }
+    },
+    "-223917667": {
+      "id": "-223917667",
+      "label": "ApplicationConfig",
+      "parent": "545846242",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "TypeOrmModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-323187286": {
+      "id": "-323187286",
+      "label": "UsersRepository",
+      "parent": "545846242",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "TypeOrmModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "UsersRepository"
+      }
+    },
+    "-1134487807": {
+      "id": "-1134487807",
+      "label": "AuthModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": false,
+        "internal": false
+      }
+    },
+    "-1846279256": {
+      "id": "-1846279256",
+      "label": "AuthModule",
+      "parent": "-1134487807",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "AuthModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "AuthModule",
+        "initTime": 1.7207090016454458
+      }
+    },
+    "-120792986": {
+      "id": "-120792986",
+      "label": "ApplicationConfig",
+      "parent": "-1134487807",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "AuthModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-793915935": {
+      "id": "-793915935",
+      "label": "AuthService",
+      "parent": "-1134487807",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "AuthModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "AuthService"
+      }
+    },
+    "-491114352": {
+      "id": "-491114352",
+      "label": "ConfigModule",
+      "parent": "863216335",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ConfigModule",
+        "initTime": 1.6761250011622906
+      }
+    },
+    "-408540748": {
+      "id": "-408540748",
+      "label": "ApplicationConfig",
+      "parent": "863216335",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ApplicationConfig"
+      }
+    },
+    "-503631784": {
+      "id": "-503631784",
+      "label": "ConfigService",
+      "parent": "863216335",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "ConfigService"
+      }
+    },
+    "-1453472830": {
+      "id": "-1453472830",
+      "label": "CONFIGURATION(jwt)",
+      "parent": "863216335",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "ConfigModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": true,
+        "token": "CONFIGURATION(jwt)",
+        "initTime": 1.68308399990201
+      }
+    },
+    "-536515674": {
+      "id": "-536515674",
+      "label": "JwtModule",
+      "metadata": {
+        "type": "module",
+        "global": false,
+        "dynamic": true,
+        "internal": false
+      }
+    },
+    "-588705940": {
+      "id": "-588705940",
+      "label": "ModuleRef",
+      "parent": "-536515674",
+      "metadata": {
+        "type": "provider",
+        "internal": true,
+        "sourceModuleName": "JwtModule",
+        "durable": false,
+        "static": true,
+        "scope": 0,
+        "transient": false,
+        "exported": false,
+        "token": "ModuleRef"
+      }
+    },
+    "-1900804336": {
+      "id": "-1900804336",
+      "label": "JWT_MODULE_OPTIONS",
+      "parent": "-536515674",
+      "metadata": {
+        "type": "provider",
+        "internal": false,
+        "sourceModuleName": "JwtModule",
+        "durable": false,
+        "static": true,
+        "transient": false,
+        "exported": false,
+        "token": "JWT_MODULE_OPTIONS",
+        "initTime": 2.720958000048995
+      }
+    }
+  },
+  "edges": {
+    "43962647": {
+      "source": "-2003726489",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "UsersModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "43962647"
+    },
+    "50149515": {
+      "source": "863216334",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "50149515"
+    },
+    "175763745": {
+      "source": "545846241",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "175763745"
+    },
+    "184060730": {
+      "source": "-643397745",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "DiscoveryModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "184060730"
+    },
+    "189694679": {
+      "source": "1434456218",
+      "target": "671882984",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "InternalCoreModule",
+        "sourceClassName": "Reflector",
+        "targetClassName": "Reflector",
+        "sourceClassToken": "Reflector",
+        "targetClassToken": "Reflector",
+        "targetModuleName": "InternalCoreModule",
+        "keyOrIndex": 0,
+        "injectionType": "constructor",
+        "internal": true
+      },
+      "id": "189694679"
+    },
+    "219775656": {
+      "source": "-19112576",
+      "target": "-1134487807",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AppModule",
+        "targetModuleName": "AuthModule"
+      },
+      "id": "219775656"
+    },
+    "241654674": {
+      "source": "-1026304274",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmCoreModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "241654674"
+    },
+    "254091268": {
+      "source": "863216333",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "254091268"
+    },
+    "309543654": {
+      "source": "-759474504",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "SmsModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "309543654"
+    },
+    "353572985": {
+      "source": "1712628187",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "353572985"
+    },
+    "420319069": {
+      "source": "-2003726489",
+      "target": "-759474504",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "UsersModule",
+        "targetModuleName": "SmsModule"
+      },
+      "id": "420319069"
+    },
+    "450524884": {
+      "source": "545846241",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "450524884"
+    },
+    "453731008": {
+      "source": "863216334",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "453731008"
+    },
+    "459666374": {
+      "source": "-759474504",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "SmsModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "459666374"
+    },
+    "508258671": {
+      "source": "612499341",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AliyunModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "508258671"
+    },
+    "527989730": {
+      "source": "-759474504",
+      "target": "545846241",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "SmsModule",
+        "targetModuleName": "TypeOrmModule"
+      },
+      "id": "527989730"
+    },
+    "561408245": {
+      "source": "-1033621697",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "DevtoolsModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "561408245"
+    },
+    "565650659": {
+      "source": "-536515674",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "JwtModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "565650659"
+    },
+    "584653416": {
+      "source": "1712628187",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "584653416"
+    },
+    "591206582": {
+      "source": "545846241",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "591206582"
+    },
+    "632258133": {
+      "source": "545846242",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "632258133"
+    },
+    "636494595": {
+      "source": "-536515674",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "JwtModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "636494595"
+    },
+    "677989064": {
+      "source": "-643397745",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "DiscoveryModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "677989064"
+    },
+    "784525888": {
+      "source": "-536515674",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "JwtModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "784525888"
+    },
+    "920687522": {
+      "source": "-1134487807",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AuthModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "920687522"
+    },
+    "978356204": {
+      "source": "-1134487807",
+      "target": "-536515674",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AuthModule",
+        "targetModuleName": "JwtModule"
+      },
+      "id": "978356204"
+    },
+    "987755577": {
+      "source": "-2003726489",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "UsersModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "987755577"
+    },
+    "1010561902": {
+      "source": "545846241",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "1010561902"
+    },
+    "1028357956": {
+      "source": "373235992",
+      "target": "-438112115",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "DevtoolsModule",
+        "sourceClassName": "SandboxedCodeExecutor",
+        "targetClassName": "MetadataScanner",
+        "sourceClassToken": "SandboxedCodeExecutor",
+        "targetClassToken": "MetadataScanner",
+        "targetModuleName": "DiscoveryModule",
+        "keyOrIndex": 2,
+        "injectionType": "constructor"
+      },
+      "id": "1028357956"
+    },
+    "1056428433": {
+      "source": "-19112576",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AppModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "1056428433"
+    },
+    "1134336077": {
+      "source": "-536515674",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "JwtModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "1134336077"
+    },
+    "1173495886": {
+      "source": "-759474504",
+      "target": "612499341",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "SmsModule",
+        "targetModuleName": "AliyunModule"
+      },
+      "id": "1173495886"
+    },
+    "1173813571": {
+      "source": "-536515674",
+      "target": "863216335",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "JwtModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "1173813571"
+    },
+    "1176615609": {
+      "source": "-2003726489",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "UsersModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "1176615609"
+    },
+    "1263570858": {
+      "source": "-759474504",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "SmsModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "1263570858"
+    },
+    "1318898112": {
+      "source": "-19112576",
+      "target": "-2135742481",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AppModule",
+        "targetModuleName": "TypeOrmModule"
+      },
+      "id": "1318898112"
+    },
+    "1333633315": {
+      "source": "863216334",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "1333633315"
+    },
+    "1359911797": {
+      "source": "-19112576",
+      "target": "612499341",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AppModule",
+        "targetModuleName": "AliyunModule"
+      },
+      "id": "1359911797"
+    },
+    "1414936007": {
+      "source": "-536515674",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "JwtModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "1414936007"
+    },
+    "1431808641": {
+      "source": "-1134487807",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AuthModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "1431808641"
+    },
+    "1450432242": {
+      "source": "1482218087",
+      "target": "863216333",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ThrottlerModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "1450432242"
+    },
+    "1454288893": {
+      "source": "-2135742481",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "1454288893"
+    },
+    "1457352847": {
+      "source": "-1134487807",
+      "target": "863216335",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AuthModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "1457352847"
+    },
+    "1488040101": {
+      "source": "211572259",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigHostModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "1488040101"
+    },
+    "1498156362": {
+      "source": "863216333",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "1498156362"
+    },
+    "1635338963": {
+      "source": "-2135742481",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "1635338963"
+    },
+    "1690588001": {
+      "source": "-1134487807",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AuthModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "1690588001"
+    },
+    "1720992914": {
+      "source": "-2003726489",
+      "target": "545846242",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "UsersModule",
+        "targetModuleName": "TypeOrmModule"
+      },
+      "id": "1720992914"
+    },
+    "1733675336": {
+      "source": "-1033621697",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "DevtoolsModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "1733675336"
+    },
+    "1733822514": {
+      "source": "1482218087",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ThrottlerModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "1733822514"
+    },
+    "1744123909": {
+      "source": "-1026304274",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmCoreModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "1744123909"
+    },
+    "1759774274": {
+      "source": "-643397745",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "DiscoveryModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "1759774274"
+    },
+    "1786225585": {
+      "source": "1482218087",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ThrottlerModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "1786225585"
+    },
+    "1867382584": {
+      "source": "-1026304274",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmCoreModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "1867382584"
+    },
+    "1901737855": {
+      "source": "863216333",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "1901737855"
+    },
+    "2090103949": {
+      "source": "545846242",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "2090103949"
+    },
+    "2099251801": {
+      "source": "211572259",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigHostModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "2099251801"
+    },
+    "2107559886": {
+      "source": "-1033621697",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "DevtoolsModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "2107559886"
+    },
+    "2109546608": {
+      "source": "863216333",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "2109546608"
+    },
+    "-1759625292": {
+      "source": "-553129559",
+      "target": "-326832201",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "InternalCoreModule",
+        "sourceClassName": "HttpAdapterHost",
+        "targetClassName": "HttpAdapterHost",
+        "sourceClassToken": "HttpAdapterHost",
+        "targetClassToken": "HttpAdapterHost",
+        "targetModuleName": "InternalCoreModule",
+        "keyOrIndex": 0,
+        "injectionType": "constructor",
+        "internal": true
+      },
+      "id": "-1759625292"
+    },
+    "-221187751": {
+      "source": "400681591",
+      "target": "-26938366",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "DiscoveryModule",
+        "sourceClassName": "DiscoveryService",
+        "targetClassName": "ModulesContainer",
+        "sourceClassToken": "DiscoveryService",
+        "targetClassToken": "ModulesContainer",
+        "targetModuleName": "InternalCoreModule",
+        "keyOrIndex": 0,
+        "injectionType": "constructor",
+        "internal": true
+      },
+      "id": "-221187751"
+    },
+    "-692061701": {
+      "source": "-19112576",
+      "target": "-1033621697",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AppModule",
+        "targetModuleName": "DevtoolsModule"
+      },
+      "id": "-692061701"
+    },
+    "-844262897": {
+      "source": "-19112576",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AppModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "-844262897"
+    },
+    "-1091370085": {
+      "source": "-19112576",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AppModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "-1091370085"
+    },
+    "-1622731513": {
+      "source": "-19112576",
+      "target": "-759474504",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AppModule",
+        "targetModuleName": "SmsModule"
+      },
+      "id": "-1622731513"
+    },
+    "-158970266": {
+      "source": "-19112576",
+      "target": "-2003726489",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AppModule",
+        "targetModuleName": "UsersModule"
+      },
+      "id": "-158970266"
+    },
+    "-815553404": {
+      "source": "-19112576",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AppModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "-815553404"
+    },
+    "-495517505": {
+      "source": "-19112576",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AppModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "-495517505"
+    },
+    "-1926621316": {
+      "source": "-1033621697",
+      "target": "-643397745",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "DevtoolsModule",
+        "targetModuleName": "DiscoveryModule"
+      },
+      "id": "-1926621316"
+    },
+    "-308574300": {
+      "source": "-1033621697",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "DevtoolsModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "-308574300"
+    },
+    "-932159694": {
+      "source": "-1033621697",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "DevtoolsModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "-932159694"
+    },
+    "-1107570771": {
+      "source": "-643397745",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "DiscoveryModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "-1107570771"
+    },
+    "-1777027914": {
+      "source": "-643397745",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "DiscoveryModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "-1777027914"
+    },
+    "-50008508": {
+      "source": "1712628187",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "-50008508"
+    },
+    "-1766726454": {
+      "source": "1712628187",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "-1766726454"
+    },
+    "-1995183955": {
+      "source": "211572259",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigHostModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "-1995183955"
+    },
+    "-60954175": {
+      "source": "211572259",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigHostModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "-60954175"
+    },
+    "-2016448962": {
+      "source": "1482218087",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ThrottlerModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "-2016448962"
+    },
+    "-1929299820": {
+      "source": "1482218087",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ThrottlerModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "-1929299820"
+    },
+    "-1982558226": {
+      "source": "863216333",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "-1982558226"
+    },
+    "-1887218609": {
+      "source": "-2135742481",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "-1887218609"
+    },
+    "-645931578": {
+      "source": "-2135742481",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "-645931578"
+    },
+    "-230488741": {
+      "source": "-2135742481",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "-230488741"
+    },
+    "-2027398394": {
+      "source": "-1026304274",
+      "target": "863216333",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmCoreModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "-2027398394"
+    },
+    "-485008942": {
+      "source": "-1026304274",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmCoreModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "-485008942"
+    },
+    "-651417091": {
+      "source": "612499341",
+      "target": "863216334",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AliyunModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "-651417091"
+    },
+    "-1086257698": {
+      "source": "612499341",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AliyunModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "-1086257698"
+    },
+    "-304556580": {
+      "source": "612499341",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AliyunModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "-304556580"
+    },
+    "-2117513122": {
+      "source": "612499341",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AliyunModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "-2117513122"
+    },
+    "-1596822380": {
+      "source": "612499341",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AliyunModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "-1596822380"
+    },
+    "-1947734289": {
+      "source": "863216334",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "-1947734289"
+    },
+    "-2041010993": {
+      "source": "863216334",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "-2041010993"
+    },
+    "-355003171": {
+      "source": "-759474504",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "SmsModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "-355003171"
+    },
+    "-663679132": {
+      "source": "-759474504",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "SmsModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "-663679132"
+    },
+    "-733930814": {
+      "source": "545846241",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "-733930814"
+    },
+    "-991562516": {
+      "source": "-2003726489",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "UsersModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "-991562516"
+    },
+    "-127805263": {
+      "source": "-2003726489",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "UsersModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "-127805263"
+    },
+    "-1762775552": {
+      "source": "545846242",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "-1762775552"
+    },
+    "-1347332715": {
+      "source": "545846242",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "-1347332715"
+    },
+    "-1627865725": {
+      "source": "545846242",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "TypeOrmModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "-1627865725"
+    },
+    "-1377619055": {
+      "source": "-1134487807",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AuthModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "-1377619055"
+    },
+    "-1088610631": {
+      "source": "-1134487807",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "AuthModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "-1088610631"
+    },
+    "-994275839": {
+      "source": "863216335",
+      "target": "211572259",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "ConfigHostModule"
+      },
+      "id": "-994275839"
+    },
+    "-1912910352": {
+      "source": "863216335",
+      "target": "555176277",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "InternalCoreModule"
+      },
+      "id": "-1912910352"
+    },
+    "-1896601298": {
+      "source": "863216335",
+      "target": "1712628187",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "ConfigModule"
+      },
+      "id": "-1896601298"
+    },
+    "-1397857332": {
+      "source": "863216335",
+      "target": "1482218087",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "ThrottlerModule"
+      },
+      "id": "-1397857332"
+    },
+    "-1881791934": {
+      "source": "863216335",
+      "target": "-1026304274",
+      "metadata": {
+        "type": "module-to-module",
+        "sourceModuleName": "ConfigModule",
+        "targetModuleName": "TypeOrmCoreModule"
+      },
+      "id": "-1881791934"
+    },
+    "-951393523": {
+      "source": "930519593",
+      "target": "1063746662",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "ConfigHostModule",
+        "sourceClassName": "ConfigService",
+        "targetClassName": "CONFIGURATION_TOKEN",
+        "sourceClassToken": "Symbol(CONFIG_SERVICE)",
+        "targetClassToken": "CONFIGURATION_TOKEN",
+        "targetModuleName": "ConfigHostModule",
+        "keyOrIndex": 0,
+        "injectionType": "constructor"
+      },
+      "id": "-951393523"
+    },
+    "-1597821732": {
+      "source": "373235992",
+      "target": "-1904419534",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "DevtoolsModule",
+        "sourceClassName": "SandboxedCodeExecutor",
+        "targetClassName": "SerializedGraph",
+        "sourceClassToken": "SandboxedCodeExecutor",
+        "targetClassToken": "SerializedGraph",
+        "targetModuleName": "InternalCoreModule",
+        "keyOrIndex": 0,
+        "injectionType": "constructor",
+        "internal": true
+      },
+      "id": "-1597821732"
+    },
+    "-2041147046": {
+      "source": "373235992",
+      "target": "-26938366",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "DevtoolsModule",
+        "sourceClassName": "SandboxedCodeExecutor",
+        "targetClassName": "ModulesContainer",
+        "sourceClassToken": "SandboxedCodeExecutor",
+        "targetClassToken": "ModulesContainer",
+        "targetModuleName": "InternalCoreModule",
+        "keyOrIndex": 1,
+        "injectionType": "constructor",
+        "internal": true
+      },
+      "id": "-2041147046"
+    },
+    "-1045206778": {
+      "source": "1310883338",
+      "target": "1063746662",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "ConfigModule",
+        "sourceClassName": "CONFIGURATION_LOADER",
+        "targetClassName": "CONFIGURATION_TOKEN",
+        "sourceClassToken": "CONFIGURATION_LOADER",
+        "targetClassToken": "CONFIGURATION_TOKEN",
+        "targetModuleName": "ConfigHostModule",
+        "keyOrIndex": 0,
+        "injectionType": "constructor"
+      },
+      "id": "-1045206778"
+    },
+    "-481663631": {
+      "source": "1310883338",
+      "target": "-1790226991",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "ConfigModule",
+        "sourceClassName": "CONFIGURATION_LOADER",
+        "targetClassName": "CONFIGURATION(aliyun)",
+        "sourceClassToken": "CONFIGURATION_LOADER",
+        "targetClassToken": "CONFIGURATION(aliyun)",
+        "targetModuleName": "ConfigModule",
+        "keyOrIndex": 1,
+        "injectionType": "constructor"
+      },
+      "id": "-481663631"
+    },
+    "-1782972962": {
+      "source": "1333473084",
+      "target": "1063746662",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "ConfigModule",
+        "sourceClassName": "CONFIGURATION_LOADER",
+        "targetClassName": "CONFIGURATION_TOKEN",
+        "sourceClassToken": "CONFIGURATION_LOADER",
+        "targetClassToken": "CONFIGURATION_TOKEN",
+        "targetModuleName": "ConfigHostModule",
+        "keyOrIndex": 0,
+        "injectionType": "constructor"
+      },
+      "id": "-1782972962"
+    },
+    "-1103714220": {
+      "source": "1333473084",
+      "target": "-1453472830",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "ConfigModule",
+        "sourceClassName": "CONFIGURATION_LOADER",
+        "targetClassName": "CONFIGURATION(jwt)",
+        "sourceClassToken": "CONFIGURATION_LOADER",
+        "targetClassToken": "CONFIGURATION(jwt)",
+        "targetModuleName": "ConfigModule",
+        "keyOrIndex": 1,
+        "injectionType": "constructor"
+      },
+      "id": "-1103714220"
+    },
+    "-1276722459": {
+      "source": "1705191969",
+      "target": "-1790226991",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "AliyunModule",
+        "sourceClassName": "AliyunService",
+        "targetClassName": "CONFIGURATION(aliyun)",
+        "sourceClassToken": "AliyunService",
+        "targetClassToken": "CONFIGURATION(aliyun)",
+        "targetModuleName": "ConfigModule",
+        "keyOrIndex": 0,
+        "injectionType": "constructor"
+      },
+      "id": "-1276722459"
+    },
+    "-711278315": {
+      "source": "-1900804336",
+      "target": "-1453472830",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "JwtModule",
+        "sourceClassName": "JWT_MODULE_OPTIONS",
+        "targetClassName": "CONFIGURATION(jwt)",
+        "sourceClassToken": "JWT_MODULE_OPTIONS",
+        "targetClassToken": "CONFIGURATION(jwt)",
+        "targetModuleName": "ConfigModule",
+        "keyOrIndex": 0,
+        "injectionType": "constructor"
+      },
+      "id": "-711278315"
+    },
+    "-1717178441": {
+      "source": "385041166",
+      "target": "-1453472830",
+      "metadata": {
+        "type": "class-to-class",
+        "sourceModuleName": "AuthModule",
+        "sourceClassName": "JwtStrategy",
+        "targetClassName": "CONFIGURATION(jwt)",
+        "sourceClassToken": "JwtStrategy",
+        "targetClassToken": "CONFIGURATION(jwt)",
+        "targetModuleName": "ConfigModule",
+        "keyOrIndex": 0,
+        "injectionType": "constructor"
+      },
+      "id": "-1717178441"
+    }
+  },
+  "entrypoints": {},
+  "extras": {
+    "orphanedEnhancers": [],
+    "attachedEnhancers": []
+  },
+  "status": "partial",
+  "metadata": {
+    "cause": {
+      "type": "unknown-dependencies",
+      "context": {
+        "index": 0,
+        "dependencies": [
+          "UsersService",
+          "JwtService"
+        ],
+        "name": "UsersService"
+      },
+      "moduleId": "-1134487807",
+      "nodeId": "-793915935"
+    }
+  }
+}

+ 5 - 0
package.json

@@ -25,8 +25,10 @@
     "@nestjs/common": "^9.3.3",
     "@nestjs/config": "^2.3.1",
     "@nestjs/core": "^9.3.3",
+    "@nestjs/devtools-integration": "^0.1.4",
     "@nestjs/jwt": "^10.0.1",
     "@nestjs/mapped-types": "1.2.2",
+    "@nestjs/passport": "^9.0.3",
     "@nestjs/platform-express": "^9.3.3",
     "@nestjs/swagger": "^6.2.1",
     "@nestjs/throttler": "^4.0.0",
@@ -39,6 +41,9 @@
     "handlebars": "^4.7.7",
     "mysql2": "^3.1.2",
     "nodemailer": "^6.9.1",
+    "passport": "^0.6.0",
+    "passport-http-bearer": "^1.0.1",
+    "passport-jwt": "^4.0.1",
     "randomstring": "^1.2.3",
     "reflect-metadata": "^0.1.13",
     "rimraf": "^4.1.2",

+ 1 - 3
src/aliyun/aliyun.module.ts

@@ -1,12 +1,10 @@
 import { Module } from '@nestjs/common'
-import { TypeOrmModule } from '@nestjs/typeorm'
-import { SmsRecord } from '../sms/entities/sms.entity'
 import { AliyunService } from './aliyun.service'
 import { ConfigModule } from '@nestjs/config'
 import aliyunConfig from './config/aliyun.config'
 
 @Module({
-    imports: [TypeOrmModule.forFeature([SmsRecord]), ConfigModule.forFeature(aliyunConfig)],
+    imports: [ConfigModule.forFeature(aliyunConfig)],
     controllers: [],
     providers: [AliyunService],
     exports: [AliyunService]

+ 0 - 4
src/app.controller.ts

@@ -1,20 +1,16 @@
 import { Controller, Get, Res, HttpStatus, UseGuards } from '@nestjs/common'
 import { AppService } from './app.service'
 import { Response } from 'express'
-import { AuthGuard } from './iam/login/decorators/auth-guard.decorator'
-import { AuthType } from './iam/login/enums/auth-type.enum'
 
 @Controller()
 export class AppController {
     constructor(private readonly appService: AppService) {}
 
-    @AuthGuard(AuthType.None)
     @Get()
     getHello(@Res() res: Response) {
         return res.status(HttpStatus.OK).json(this.appService.getHello())
     }
 
-    @AuthGuard(AuthType.Bearer)
     @Get('secure')
     getProtectedResource(@Res() res: Response) {
         return res.status(HttpStatus.OK).json(this.appService.getSecureResource())

+ 9 - 4
src/app.module.ts

@@ -6,12 +6,17 @@ import { AppController } from './app.controller'
 import { AppService } from './app.service'
 import { UsersModule } from './users/users.module'
 import { ThrottlerModule } from '@nestjs/throttler'
-import { IamModule } from './iam/iam.module'
 import * as Yup from 'yup'
 import { SmsModule } from './sms/sms.module'
+import { DevtoolsModule } from '@nestjs/devtools-integration'
+import { AuthModule } from './auth/auth.module';
 
 @Module({
     imports: [
+        DevtoolsModule.register({
+            http: process.env.NODE_ENV !== 'production',
+            port: 8000
+        }),
         ConfigModule.forRoot({
             isGlobal: true,
             envFilePath: ['.env', '.env.dev', '.env.stage', '.env.prod'],
@@ -51,10 +56,10 @@ import { SmsModule } from './sms/sms.module'
                 }
             })
         }),
-        IamModule,
-        UsersModule,
         AliyunModule,
-        SmsModule
+        SmsModule,
+        UsersModule,
+        AuthModule
     ],
     controllers: [AppController],
     providers: [AppService]

+ 18 - 0
src/auth/auth.controller.spec.ts

@@ -0,0 +1,18 @@
+import { Test, TestingModule } from '@nestjs/testing';
+import { AuthController } from './auth.controller';
+
+describe('AuthController', () => {
+  let controller: AuthController;
+
+  beforeEach(async () => {
+    const module: TestingModule = await Test.createTestingModule({
+      controllers: [AuthController],
+    }).compile();
+
+    controller = module.get<AuthController>(AuthController);
+  });
+
+  it('should be defined', () => {
+    expect(controller).toBeDefined();
+  });
+});

+ 17 - 0
src/auth/auth.controller.ts

@@ -0,0 +1,17 @@
+import { PhoneLoginDto } from './dto/login.dto'
+import { Body, Controller, Post } from '@nestjs/common'
+import { AuthService } from './auth.service'
+import { ApiTags } from '@nestjs/swagger'
+import { Public } from './public.decorator'
+
+@ApiTags('auth')
+@Controller('/auth')
+export class AuthController {
+    constructor(private readonly authService: AuthService) {}
+
+    @Public()
+    @Post('/phoneLogin')
+    async phoneLogin(@Body() loginDto: PhoneLoginDto) {
+        return this.authService.loginByPhone(loginDto)
+    }
+}

+ 25 - 0
src/auth/auth.module.ts

@@ -0,0 +1,25 @@
+import { Module } from '@nestjs/common'
+import { AuthService } from './auth.service'
+import { ConfigModule } from '@nestjs/config'
+import jwtConfig from './jwt.config'
+import { JwtModule } from '@nestjs/jwt'
+import { JwtStrategy } from './jwt.strategy'
+import { UsersModule } from 'src/users/users.module'
+import { AuthController } from './auth.controller'
+import { APP_GUARD } from '@nestjs/core'
+import { JwtAuthGuard } from './jwt-auth.guard'
+
+@Module({
+    imports: [ConfigModule.forFeature(jwtConfig), JwtModule.registerAsync(jwtConfig.asProvider()), UsersModule],
+    providers: [
+        AuthService,
+        JwtStrategy,
+        {
+            provide: APP_GUARD,
+            useClass: JwtAuthGuard
+        }
+    ],
+    controllers: [AuthController],
+    exports: [AuthService]
+})
+export class AuthModule {}

+ 18 - 0
src/auth/auth.service.spec.ts

@@ -0,0 +1,18 @@
+import { Test, TestingModule } from '@nestjs/testing';
+import { AuthService } from './auth.service';
+
+describe('AuthService', () => {
+  let service: AuthService;
+
+  beforeEach(async () => {
+    const module: TestingModule = await Test.createTestingModule({
+      providers: [AuthService],
+    }).compile();
+
+    service = module.get<AuthService>(AuthService);
+  });
+
+  it('should be defined', () => {
+    expect(service).toBeDefined();
+  });
+});

+ 21 - 0
src/auth/auth.service.ts

@@ -0,0 +1,21 @@
+import { PhoneLoginDto } from './dto/login.dto'
+import { Injectable } from '@nestjs/common'
+import { JwtService } from '@nestjs/jwt'
+import { UsersService } from 'src/users/users.service'
+
+@Injectable()
+export class AuthService {
+    constructor(private readonly usersService: UsersService, private readonly jwtService: JwtService) {}
+
+    async loginByPhone(loginDto: PhoneLoginDto) {
+        let user = await this.usersService.loginByPhone(loginDto.phone, loginDto.code, loginDto.invitor)
+        const payload = {
+            username: user.username,
+            sub: user.id,
+            roles: user.roles
+        }
+        return {
+            access_token: this.jwtService.sign(payload)
+        }
+    }
+}

+ 11 - 0
src/auth/dto/login.dto.ts

@@ -0,0 +1,11 @@
+import { IsString } from 'class-validator'
+
+export class PhoneLoginDto {
+    @IsString()
+    readonly phone: string
+
+    @IsString()
+    readonly code: string
+
+    readonly invitor: number | null
+}

+ 22 - 0
src/auth/jwt-auth.guard.ts

@@ -0,0 +1,22 @@
+import { ExecutionContext, Injectable } from '@nestjs/common'
+import { Reflector } from '@nestjs/core'
+import { AuthGuard } from '@nestjs/passport'
+import { IS_PUBLIC_KEY } from './public.decorator'
+
+@Injectable()
+export class JwtAuthGuard extends AuthGuard('jwt') {
+    constructor(private reflector: Reflector) {
+        super()
+    }
+
+    canActivate(context: ExecutionContext) {
+        const isPublic = this.reflector.getAllAndOverride<boolean>(IS_PUBLIC_KEY, [
+            context.getHandler(),
+            context.getClass()
+        ])
+        if (isPublic) {
+            return true
+        }
+        return super.canActivate(context)
+    }
+}

+ 0 - 0
src/iam/login/config/jwt.config.ts → src/auth/jwt.config.ts


+ 27 - 0
src/auth/jwt.strategy.ts

@@ -0,0 +1,27 @@
+import { ExtractJwt, Strategy } from 'passport-jwt'
+import { PassportStrategy } from '@nestjs/passport'
+import { Inject, Injectable } from '@nestjs/common'
+import jwtconfig from './jwt.config'
+import { ConfigType } from '@nestjs/config'
+
+@Injectable()
+export class JwtStrategy extends PassportStrategy(Strategy) {
+    constructor(
+        @Inject(jwtconfig.KEY)
+        private readonly jwtConfiguration: ConfigType<typeof jwtconfig>
+    ) {
+        super({
+            jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
+            ignoreExpiration: false,
+            secretOrKey: jwtConfiguration.secret
+        })
+    }
+
+    async validate(payload: any) {
+        return {
+            userId: payload.sub,
+            username: payload.username,
+            roles: payload.roles
+        }
+    }
+}

+ 4 - 0
src/auth/public.decorator.ts

@@ -0,0 +1,4 @@
+import { SetMetadata } from '@nestjs/common';
+
+export const IS_PUBLIC_KEY = 'isPublic';
+export const Public = () => SetMetadata(IS_PUBLIC_KEY, true);

+ 0 - 55
src/iam/change-password/change-password.controller.spec.ts

@@ -1,55 +0,0 @@
-import { BadRequestException } from '@nestjs/common'
-import { Test, TestingModule } from '@nestjs/testing'
-import { ChangePasswordController } from './change-password.controller'
-import { ChangePasswordService } from './change-password.service'
-import { ChangePasswordDto } from './dto/change-password.dto'
-
-const changePasswordDto: ChangePasswordDto = {
-    email: 'text@example.com',
-    password: 'password123'
-}
-
-describe('ChangePassword Controller', () => {
-    let changePasswordController: ChangePasswordController
-    let changePasswordService: ChangePasswordService
-
-    beforeEach(async () => {
-        const module: TestingModule = await Test.createTestingModule({
-            controllers: [ChangePasswordController],
-            providers: [
-                {
-                    provide: ChangePasswordService,
-                    useValue: {
-                        changePassword: jest.fn(() => {})
-                    }
-                }
-            ]
-        }).compile()
-
-        changePasswordController = module.get<ChangePasswordController>(ChangePasswordController)
-        changePasswordService = module.get<ChangePasswordService>(ChangePasswordService)
-    })
-
-    describe('Change Password', () => {
-        it('should be defined', () => {
-            expect(changePasswordController).toBeDefined()
-        })
-
-        it('should call method changePassword in changePasswordService', async () => {
-            const createSpy = jest.spyOn(changePasswordService, 'changePassword')
-
-            await changePasswordController.changePassword(changePasswordDto)
-            expect(createSpy).toHaveBeenCalledWith(changePasswordDto)
-        })
-
-        it('should throw an exception if it not find an user email', async () => {
-            changePasswordService.changePassword = jest.fn().mockRejectedValueOnce(null)
-            await expect(
-                changePasswordController.changePassword({
-                    email: 'not a correct email',
-                    password: 'not a correct password'
-                })
-            ).rejects.toThrow(BadRequestException)
-        })
-    })
-})

+ 0 - 27
src/iam/change-password/change-password.controller.ts

@@ -1,27 +0,0 @@
-import { Controller, Post, Body, HttpStatus, BadRequestException } from '@nestjs/common'
-import { ChangePasswordService } from './change-password.service'
-import { ChangePasswordDto } from './dto/change-password.dto'
-import { ApiTags } from '@nestjs/swagger'
-import { AuthGuard } from '../login/decorators/auth-guard.decorator'
-import { AuthType } from '../login/enums/auth-type.enum'
-
-@ApiTags('auth')
-@AuthGuard(AuthType.Bearer)
-@Controller('auth/change-password')
-export class ChangePasswordController {
-    constructor(private readonly changePasswordService: ChangePasswordService) {}
-
-    @Post()
-    public async changePassword(@Body() changePasswordDto: ChangePasswordDto): Promise<any> {
-        try {
-            await this.changePasswordService.changePassword(changePasswordDto)
-
-            return {
-                message: 'Request Change Password Successfully!',
-                status: HttpStatus.OK
-            }
-        } catch (err) {
-            throw new BadRequestException(err, 'Error: Change password failed!')
-        }
-    }
-}

+ 0 - 35
src/iam/change-password/change-password.module.ts

@@ -1,35 +0,0 @@
-import { Module } from '@nestjs/common'
-import { ChangePasswordController } from './change-password.controller'
-import { ChangePasswordService } from './change-password.service'
-import { TypeOrmModule } from '@nestjs/typeorm'
-import { Users } from '../../users/entities/users.entity'
-import { UsersService } from '../../users/users.service'
-import { MailerModule } from '../../shared/mailer/mailer.module'
-import { BcryptService } from '../../shared/hashing/bcrypt.service'
-import { HashingService } from '../../shared/hashing/hashing.service'
-import { APP_GUARD } from '@nestjs/core'
-import { AuthenticationGuard } from '../login/guards/authentication/authentication.guard'
-import { AccessTokenGuard } from '../login/guards/access-token/access-token.guard'
-import { JwtService } from '@nestjs/jwt'
-import { ConfigModule } from '@nestjs/config'
-import jwtConfig from '../login/config/jwt.config'
-
-@Module({
-    imports: [ConfigModule.forFeature(jwtConfig), TypeOrmModule.forFeature([Users]), MailerModule],
-    controllers: [ChangePasswordController],
-    providers: [
-        {
-            provide: HashingService,
-            useClass: BcryptService
-        },
-        {
-            provide: APP_GUARD,
-            useClass: AuthenticationGuard
-        },
-        AccessTokenGuard,
-        ChangePasswordService,
-        UsersService,
-        JwtService
-    ]
-})
-export class ChangePasswordModule {}

+ 0 - 70
src/iam/change-password/change-password.service.spec.ts

@@ -1,70 +0,0 @@
-import { Test, TestingModule } from '@nestjs/testing'
-import { ChangePasswordService } from './change-password.service'
-import { getRepositoryToken } from '@nestjs/typeorm'
-import { Users } from '../../users/entities/users.entity'
-import { Repository } from 'typeorm'
-import { UsersService } from '../../users/users.service'
-import { MailerService } from '../../shared/mailer/mailer.service'
-import { ConfigService } from '@nestjs/config'
-
-const changePasswordUser = {
-    email: 'test@example.it',
-    password: '1234567'
-}
-
-describe('ChangePasswordService', () => {
-    let service: ChangePasswordService
-    let repository: Repository<Users>
-
-    beforeEach(async () => {
-        const module: TestingModule = await Test.createTestingModule({
-            providers: [
-                ChangePasswordService,
-                {
-                    provide: UsersService,
-                    useValue: {
-                        updateByPassword: jest.fn().mockResolvedValue(changePasswordUser)
-                    }
-                },
-                {
-                    provide: MailerService,
-                    useValue: {
-                        sendMail: jest.fn()
-                    }
-                },
-                {
-                    provide: ConfigService,
-                    useValue: {
-                        get: jest.fn().mockReturnValue('some string')
-                    }
-                },
-                {
-                    provide: getRepositoryToken(Users),
-                    useValue: {
-                        findOneBy: jest.fn(),
-                        updateByPassword: jest.fn(),
-                        save: jest.fn()
-                    }
-                }
-            ]
-        }).compile()
-
-        service = module.get<ChangePasswordService>(ChangePasswordService)
-        repository = module.get<Repository<Users>>(getRepositoryToken(Users))
-    })
-
-    describe('change password user', () => {
-        it('should be defined', () => {
-            expect(service).toBeDefined()
-        })
-
-        it('should change password a user', () => {
-            expect(
-                service.changePassword({
-                    email: 'test@example.it',
-                    password: '1234567'
-                })
-            ).resolves.toEqual(changePasswordUser)
-        })
-    })
-})

+ 0 - 35
src/iam/change-password/change-password.service.ts

@@ -1,35 +0,0 @@
-import { Injectable, Logger } from '@nestjs/common'
-import { UsersService } from '../../users/users.service'
-import { ChangePasswordDto } from './dto/change-password.dto'
-import { MailerService } from '../../shared/mailer/mailer.service'
-
-@Injectable()
-export class ChangePasswordService {
-    constructor(private readonly usersService: UsersService, private readonly mailerService: MailerService) {}
-
-    public async changePassword(changePasswordDto: ChangePasswordDto): Promise<any> {
-        this.sendMailChangePassword(changePasswordDto)
-
-        return await this.usersService.updateByPassword(changePasswordDto.email, changePasswordDto.password)
-    }
-
-    private sendMailChangePassword(user): void {
-        try {
-            this.mailerService.sendMail({
-                to: user.email,
-                from: 'from@example.com',
-                subject: 'Change Password successful ✔',
-                text: 'Change Password successful!',
-                template: 'index',
-                context: {
-                    title: 'Change Password successful!',
-                    description: 'Change Password Successfully! ✔, This is your new password: ' + user.password,
-                    nameUser: user.name
-                }
-            })
-            Logger.log('[MailService] Change Password: Send Mail successfully!')
-        } catch (err) {
-            Logger.error('[MailService] Change Password: Send Mail Failed!', err)
-        }
-    }
-}

+ 0 - 4
src/iam/change-password/dto/change-password.dto.ts

@@ -1,4 +0,0 @@
-import { PickType } from '@nestjs/swagger'
-import { UserDto } from '../../../users/dto/user.dto'
-
-export class ChangePasswordDto extends PickType(UserDto, ['email', 'password'] as const) {}

+ 0 - 4
src/iam/forgot-password/dto/forgot-password.dto.ts

@@ -1,4 +0,0 @@
-import { PickType } from '@nestjs/swagger'
-import { UserDto } from '../../../users/dto/user.dto'
-
-export class ForgotPasswordDto extends PickType(UserDto, ['email'] as const) {}

+ 0 - 53
src/iam/forgot-password/forgot-password.controller.spec.ts

@@ -1,53 +0,0 @@
-import { Test, TestingModule } from '@nestjs/testing'
-import { ForgotPasswordController } from './forgot-password.controller'
-import { ForgotPasswordService } from './forgot-password.service'
-import { ForgotPasswordDto } from './dto/forgot-password.dto'
-import { BadRequestException } from '@nestjs/common'
-
-const forgotPasswordDto: ForgotPasswordDto = {
-    email: 'test@example.com'
-}
-
-describe('ForgotPassword Controller', () => {
-    let forgotPasswordController: ForgotPasswordController
-    let forgotPasswordService: ForgotPasswordService
-
-    beforeEach(async () => {
-        const module: TestingModule = await Test.createTestingModule({
-            controllers: [ForgotPasswordController],
-            providers: [
-                {
-                    provide: ForgotPasswordService,
-                    useValue: {
-                        forgotPassword: jest.fn(() => {})
-                    }
-                }
-            ]
-        }).compile()
-
-        forgotPasswordController = module.get<ForgotPasswordController>(ForgotPasswordController)
-        forgotPasswordService = module.get<ForgotPasswordService>(ForgotPasswordService)
-    })
-
-    describe('Forgot Password', () => {
-        it('should be defined', () => {
-            expect(forgotPasswordController).toBeDefined()
-        })
-
-        it('should call method forgotPassword in forgotPasswordService', async () => {
-            const createSpy = jest.spyOn(forgotPasswordService, 'forgotPassword')
-
-            await forgotPasswordController.forgotPassword(forgotPasswordDto)
-            expect(createSpy).toHaveBeenCalledWith(forgotPasswordDto)
-        })
-
-        it('should throw an exception if it not find an user email', async () => {
-            forgotPasswordService.forgotPassword = jest.fn().mockRejectedValueOnce(null)
-            await expect(
-                forgotPasswordController.forgotPassword({
-                    email: 'not a correct email'
-                })
-            ).rejects.toThrow(BadRequestException)
-        })
-    })
-})

+ 0 - 27
src/iam/forgot-password/forgot-password.controller.ts

@@ -1,27 +0,0 @@
-import { Controller, Post, Body, HttpStatus, BadRequestException } from '@nestjs/common'
-import { ApiTags } from '@nestjs/swagger'
-import { ForgotPasswordService } from '../forgot-password/forgot-password.service'
-import { AuthGuard } from '../login/decorators/auth-guard.decorator'
-import { AuthType } from '../login/enums/auth-type.enum'
-import { ForgotPasswordDto } from './dto/forgot-password.dto'
-
-@ApiTags('auth')
-@AuthGuard(AuthType.None)
-@Controller('auth/forgot-password')
-export class ForgotPasswordController {
-    constructor(private readonly forgotPasswordService: ForgotPasswordService) {}
-
-    @Post()
-    public async forgotPassword(@Body() forgotPasswordDto: ForgotPasswordDto): Promise<any> {
-        try {
-            await this.forgotPasswordService.forgotPassword(forgotPasswordDto)
-
-            return {
-                message: 'Request Reset Password Successfully!',
-                status: HttpStatus.OK
-            }
-        } catch (err) {
-            throw new BadRequestException(err, 'Error: Forgot password failed!')
-        }
-    }
-}

+ 0 - 24
src/iam/forgot-password/forgot-password.module.ts

@@ -1,24 +0,0 @@
-import { Module } from '@nestjs/common'
-import { ForgotPasswordService } from './forgot-password.service'
-import { ForgotPasswordController } from './forgot-password.controller'
-import { TypeOrmModule } from '@nestjs/typeorm'
-import { Users } from '../../users/entities/users.entity'
-import { UsersService } from '../../users/users.service'
-import { MailerModule } from '../../shared/mailer/mailer.module'
-import { UtilsModule } from '../../shared/utils/utils.module'
-import { BcryptService } from '../../shared/hashing/bcrypt.service'
-import { HashingService } from '../../shared/hashing/hashing.service'
-
-@Module({
-    imports: [TypeOrmModule.forFeature([Users]), MailerModule, UtilsModule],
-    providers: [
-        {
-            provide: HashingService,
-            useClass: BcryptService
-        },
-        ForgotPasswordService,
-        UsersService
-    ],
-    controllers: [ForgotPasswordController]
-})
-export class ForgotPasswordModule {}

+ 0 - 83
src/iam/forgot-password/forgot-password.service.spec.ts

@@ -1,83 +0,0 @@
-import { Test, TestingModule } from '@nestjs/testing'
-import { getRepositoryToken } from '@nestjs/typeorm'
-import { Users } from '../../users/entities/users.entity'
-import { ForgotPasswordService } from './forgot-password.service'
-import { MailerService } from '../../shared/mailer/mailer.service'
-import { UtilsService } from '../../shared/utils/utils.service'
-import { ConfigService } from '@nestjs/config'
-import { HashingService } from '../../shared/hashing/hashing.service'
-import { Repository } from 'typeorm'
-import { UsersService } from '../../users/users.service'
-
-const oneUser = {
-    email: 'test@example.com'
-}
-
-const user = {
-    email: 'test@example.com',
-    password: 'pass123'
-}
-
-describe('ForgotPasswordService', () => {
-    let service: ForgotPasswordService
-    let repository: Repository<Users>
-    let mailerService: MailerService
-
-    beforeEach(async () => {
-        const module: TestingModule = await Test.createTestingModule({
-            providers: [
-                ForgotPasswordService,
-                {
-                    provide: UsersService,
-                    useValue: {
-                        forgotPassword: jest.fn()
-                    }
-                },
-                {
-                    provide: getRepositoryToken(Users),
-                    useValue: {
-                        findOneBy: jest.fn(() => oneUser),
-                        save: jest.fn(() => user)
-                    }
-                },
-                {
-                    provide: HashingService,
-                    useValue: {
-                        hash: jest.fn(() => 'pass123')
-                    }
-                },
-                {
-                    provide: ConfigService,
-                    useValue: {
-                        get: jest.fn().mockReturnValue('some string')
-                    }
-                },
-                {
-                    provide: MailerService,
-                    useValue: {
-                        sendMail: jest.fn()
-                    }
-                },
-                UtilsService
-            ]
-        }).compile()
-
-        service = module.get<ForgotPasswordService>(ForgotPasswordService)
-        mailerService = module.get<MailerService>(MailerService)
-        repository = module.get<Repository<Users>>(getRepositoryToken(Users))
-    })
-
-    describe('forgot password user', () => {
-        it('should be defined', () => {
-            expect(service).toBeDefined()
-        })
-
-        it('should generate a new password for user by email', async () => {
-            expect(
-                await service.forgotPassword({
-                    email: 'test@example.com'
-                })
-            ).toEqual(oneUser)
-        })
-    })
-})

+ 0 - 50
src/iam/forgot-password/forgot-password.service.ts

@@ -1,50 +0,0 @@
-import { Injectable, Logger } from '@nestjs/common'
-import { Repository } from 'typeorm'
-import { InjectRepository } from '@nestjs/typeorm'
-import { Users } from '../../users/entities/users.entity'
-import { ForgotPasswordDto } from './dto/forgot-password.dto'
-import { MailerService } from '../../shared/mailer/mailer.service'
-import { UtilsService } from '../../shared/utils/utils.service'
-import { HashingService } from '../../shared/hashing/hashing.service'
-
-@Injectable()
-export class ForgotPasswordService {
-    constructor(
-        @InjectRepository(Users)
-        private readonly userRepository: Repository<Users>,
-        private readonly mailerService: MailerService,
-        private readonly utilsService: UtilsService,
-        private readonly hashingService: HashingService
-    ) {}
-
-    public async forgotPassword(forgotPasswordDto: ForgotPasswordDto): Promise<any> {
-        const userUpdate = await this.userRepository.findOneBy({
-            email: forgotPasswordDto.email
-        })
-        const passwordRand = this.utilsService.generatePassword()
-        userUpdate.password = await this.hashingService.hash(passwordRand)
-
-        this.sendMailForgotPassword(userUpdate.email, passwordRand)
-
-        return await this.userRepository.save(userUpdate)
-    }
-
-    private sendMailForgotPassword(email, password): void {
-        try {
-            this.mailerService.sendMail({
-                to: email,
-                from: 'from@example.com',
-                subject: 'Forgot Password successful ✔',
-                text: 'Forgot Password successful!',
-                template: 'index',
-                context: {
-                    title: 'Forgot Password successful!',
-                    description: 'Request Reset Password Successfully!  ✔, This is your new password: ' + password
-                }
-            })
-            Logger.log('[MailService] Forgot Password: Send Mail successfully!')
-        } catch (err) {
-            Logger.error('[MailService] Forgot Password: Send Mail Failed!', err)
-        }
-    }
-}

+ 0 - 2
src/iam/iam.constants.ts

@@ -1,2 +0,0 @@
-export const REQUEST_USER_KEY = 'user'
-export const TYPE_TOKEN_BEARER = 'Bearer'

+ 0 - 14
src/iam/iam.module.ts

@@ -1,14 +0,0 @@
-import { Module } from '@nestjs/common'
-import { JwtService } from '@nestjs/jwt'
-import { UtilsModule } from '../shared/utils/utils.module'
-import { UsersModule } from '../users/users.module'
-import { ChangePasswordModule } from './change-password/change-password.module'
-import { ForgotPasswordModule } from './forgot-password/forgot-password.module'
-import { LoginModule } from './login/login.module'
-import { RegisterModule } from './register/register.module'
-
-@Module({
-    imports: [LoginModule, RegisterModule, UsersModule, ForgotPasswordModule, ChangePasswordModule, UtilsModule],
-    providers: [JwtService]
-})
-export class IamModule {}

+ 0 - 6
src/iam/login/decorators/auth-guard.decorator.ts

@@ -1,6 +0,0 @@
-import { SetMetadata } from '@nestjs/common'
-import { AuthType } from '../enums/auth-type.enum'
-
-export const AUTH_TYPE_KEY = 'authType'
-
-export const AuthGuard = (...authTypes: AuthType[]) => SetMetadata(AUTH_TYPE_KEY, authTypes)

+ 0 - 4
src/iam/login/dto/login.dto.ts

@@ -1,4 +0,0 @@
-import { PickType } from '@nestjs/swagger'
-import { UserDto } from '../../../users/dto/user.dto'
-
-export class LoginDto extends PickType(UserDto, ['email', 'password'] as const) {}

+ 0 - 4
src/iam/login/enums/auth-type.enum.ts

@@ -1,4 +0,0 @@
-export enum AuthType {
-    Bearer,
-    None
-}

+ 0 - 36
src/iam/login/guards/access-token/access-token.guard.ts

@@ -1,36 +0,0 @@
-import { CanActivate, ExecutionContext, HttpStatus, Inject, Injectable, UnauthorizedException } from '@nestjs/common'
-import { ConfigType } from '@nestjs/config'
-import { JwtService } from '@nestjs/jwt'
-import { Request } from 'express'
-import { REQUEST_USER_KEY, TYPE_TOKEN_BEARER } from '../../../iam.constants'
-import jwtConfig from '../../config/jwt.config'
-
-@Injectable()
-export class AccessTokenGuard implements CanActivate {
-    constructor(
-        private readonly jwtService: JwtService,
-        @Inject(jwtConfig.KEY)
-        private readonly jwtConfiguration: ConfigType<typeof jwtConfig>
-    ) {}
-
-    async canActivate(context: ExecutionContext): Promise<boolean> {
-        const request = context.switchToHttp().getRequest()
-        const token = this.extractTokenFromHeader(request)
-        if (!token) {
-            throw new UnauthorizedException()
-        }
-
-        try {
-            const payload = await this.jwtService.verifyAsync(token, this.jwtConfiguration)
-            request[REQUEST_USER_KEY] = payload
-        } catch (err) {
-            throw new UnauthorizedException(HttpStatus.UNAUTHORIZED, err)
-        }
-        return true
-    }
-
-    private extractTokenFromHeader(request: Request): string | undefined {
-        const [type, token] = request.headers.authorization?.split(' ') ?? []
-        return type === TYPE_TOKEN_BEARER ? token : undefined
-    }
-}

+ 0 - 36
src/iam/login/guards/authentication/authentication.guard.ts

@@ -1,36 +0,0 @@
-import { CanActivate, ExecutionContext, Injectable, UnauthorizedException } from '@nestjs/common'
-import { Reflector } from '@nestjs/core'
-import { AuthType } from '../../enums/auth-type.enum'
-import { AccessTokenGuard } from '../access-token/access-token.guard'
-import { AUTH_TYPE_KEY } from '../../decorators/auth-guard.decorator'
-
-@Injectable()
-export class AuthenticationGuard implements CanActivate {
-    private static readonly defaultAuthType = AuthType.Bearer
-    private readonly authTypeGuardMap: Record<AuthType, CanActivate | CanActivate[]> = {
-        [AuthType.Bearer]: this.accessTokenGuard,
-        [AuthType.None]: { canActivate: () => true }
-    }
-
-    constructor(private readonly reflector: Reflector, private readonly accessTokenGuard: AccessTokenGuard) {}
-
-    async canActivate(context: ExecutionContext): Promise<boolean> {
-        const authTypes = this.reflector.getAllAndOverride<AuthType[]>(AUTH_TYPE_KEY, [
-            context.getHandler(),
-            context.getClass()
-        ]) ?? [AuthenticationGuard.defaultAuthType]
-        const guards = authTypes.map((type) => this.authTypeGuardMap[type]).flat()
-        let error = new UnauthorizedException()
-
-        for (const instance of guards) {
-            const canActivate = await Promise.resolve(instance.canActivate(context)).catch((err) => {
-                error = err
-            })
-
-            if (canActivate) {
-                return true
-            }
-        }
-        throw error
-    }
-}

+ 0 - 5
src/iam/login/interfaces/jwt-payload.interface.ts

@@ -1,5 +0,0 @@
-export interface JWTPayload {
-    id: number
-    email: string
-    name: string
-}

+ 0 - 51
src/iam/login/login.controller.spec.ts

@@ -1,51 +0,0 @@
-import { Test, TestingModule } from '@nestjs/testing'
-import { UsersService } from '../../users/users.service'
-import { LoginController } from './login.controller'
-import { LoginService } from './login.service'
-import { LoginDto } from './dto/login.dto'
-
-const loginDto: LoginDto = {
-    email: 'test@example.com',
-    password: 'password123'
-}
-
-describe('Login Controller', () => {
-    let loginController: LoginController
-    let loginService: LoginService
-
-    beforeEach(async () => {
-        const module: TestingModule = await Test.createTestingModule({
-            controllers: [LoginController],
-            providers: [
-                {
-                    provide: LoginService,
-                    useValue: {
-                        login: jest.fn(() => {})
-                    }
-                },
-                {
-                    provide: UsersService,
-                    useValue: {
-                        findByEmail: jest.fn(() => {})
-                    }
-                }
-            ]
-        }).compile()
-
-        loginController = module.get<LoginController>(LoginController)
-        loginService = module.get<LoginService>(LoginService)
-    })
-
-    describe('Login user', () => {
-        it('should be defined', () => {
-            expect(loginController).toBeDefined()
-        })
-
-        it('should call method login in loginService', async () => {
-            const createSpy = jest.spyOn(loginService, 'login')
-
-            await loginController.login(loginDto)
-            expect(createSpy).toHaveBeenCalledWith(loginDto)
-        })
-    })
-})

+ 0 - 18
src/iam/login/login.controller.ts

@@ -1,18 +0,0 @@
-import { Controller, Post, Body } from '@nestjs/common'
-import { LoginService } from './login.service'
-import { LoginDto } from '../login/dto/login.dto'
-import { ApiTags } from '@nestjs/swagger'
-import { AuthType } from './enums/auth-type.enum'
-import { AuthGuard } from './decorators/auth-guard.decorator'
-
-@ApiTags('auth')
-@AuthGuard(AuthType.None)
-@Controller('auth/login')
-export class LoginController {
-    constructor(private readonly loginService: LoginService) {}
-
-    @Post()
-    public async login(@Body() loginDto: LoginDto): Promise<any> {
-        return await this.loginService.login(loginDto)
-    }
-}

+ 0 - 37
src/iam/login/login.module.ts

@@ -1,37 +0,0 @@
-import { Module } from '@nestjs/common'
-import { LoginService } from './login.service'
-import { LoginController } from './login.controller'
-import { TypeOrmModule } from '@nestjs/typeorm'
-import { Users } from '../../users/entities/users.entity'
-import { JwtModule } from '@nestjs/jwt'
-import { UsersService } from '../../users/users.service'
-import { ConfigModule } from '@nestjs/config'
-import { HashingService } from '../../shared/hashing/hashing.service'
-import { BcryptService } from '../../shared/hashing/bcrypt.service'
-import { APP_GUARD } from '@nestjs/core'
-import { AuthenticationGuard } from './guards/authentication/authentication.guard'
-import { AccessTokenGuard } from './guards/access-token/access-token.guard'
-import jwtConfig from './config/jwt.config'
-
-@Module({
-    imports: [
-        TypeOrmModule.forFeature([Users]),
-        ConfigModule.forFeature(jwtConfig),
-        JwtModule.registerAsync(jwtConfig.asProvider())
-    ],
-    providers: [
-        {
-            provide: HashingService,
-            useClass: BcryptService
-        },
-        {
-            provide: APP_GUARD,
-            useClass: AuthenticationGuard
-        },
-        AccessTokenGuard,
-        LoginService,
-        UsersService
-    ],
-    controllers: [LoginController]
-})
-export class LoginModule {}

+ 0 - 129
src/iam/login/login.service.spec.ts

@@ -1,129 +0,0 @@
-import { ConfigService } from '@nestjs/config'
-import { JwtService } from '@nestjs/jwt'
-import { Test, TestingModule } from '@nestjs/testing'
-import { HashingService } from '../../shared/hashing/hashing.service'
-import { LoginService } from './login.service'
-import { UsersService } from '../../users/users.service'
-import { Users } from '../../users/entities/users.entity'
-import { getRepositoryToken } from '@nestjs/typeorm'
-import { LoginDto } from './dto/login.dto'
-import { UnauthorizedException, HttpException } from '@nestjs/common'
-
-const oneUser = {
-    id: 1,
-    name: 'name #1',
-    username: 'username #1',
-    email: 'test@example.com',
-    password: 'pass123'
-}
-
-const loginDto: LoginDto = {
-    email: 'test@example.com',
-    password: 'pass123'
-}
-
-const userLogin = {
-    sub: 1,
-    accessToken: undefined,
-    audience: 'some string',
-    expiresIn: 'some string',
-    issuer: 'some string',
-    user: {
-        id: 1,
-        name: 'name #1',
-        email: 'test@example.com'
-    }
-}
-
-const payload = {
-    id: 1,
-    name: 'name #1',
-    email: 'test@example.com'
-}
-
-describe('LoginService', () => {
-    let loginService: LoginService
-    let usersService: UsersService
-    let hashingService: HashingService
-
-    beforeEach(async () => {
-        const module: TestingModule = await Test.createTestingModule({
-            providers: [
-                LoginService,
-                {
-                    provide: JwtService,
-                    useValue: {
-                        signAsync: jest.fn(),
-                        signToken: jest.fn(() => payload)
-                    }
-                },
-                {
-                    provide: ConfigService,
-                    useValue: {
-                        get: jest.fn().mockReturnValue('some string')
-                    }
-                },
-                {
-                    provide: HashingService,
-                    useValue: {
-                        hash: jest.fn(() => Promise.resolve('pass123')),
-                        compare: jest.fn(() => Promise.resolve(true))
-                    }
-                },
-                {
-                    provide: UsersService,
-                    useValue: {
-                        findByEmail: jest.fn().mockResolvedValue(oneUser)
-                    }
-                },
-                {
-                    provide: getRepositoryToken(Users),
-                    useValue: {
-                        findByEmail: jest.fn(),
-                        findOneBy: jest.fn().mockReturnValue(oneUser),
-                        findOne: jest.fn().mockReturnValue(oneUser)
-                    }
-                }
-            ]
-        }).compile()
-
-        loginService = module.get<LoginService>(LoginService)
-        usersService = module.get<UsersService>(UsersService)
-        hashingService = module.get<HashingService>(HashingService)
-    })
-
-    it('should be defined', () => {
-        expect(loginService).toBeDefined()
-    })
-
-    describe('findUserByEmail() method', () => {
-        it('should find a user by email', async () => {
-            expect(await loginService.findUserByEmail(loginDto)).toEqual(oneUser)
-        })
-
-        it('should generate token jwt', async () => {
-            expect(await loginService.login(loginDto)).toEqual(userLogin)
-        })
-
-        it('should return an exception if wrong password', async () => {
-            usersService.findByEmail = jest.fn().mockResolvedValueOnce(oneUser)
-            hashingService.compare = jest.fn().mockResolvedValueOnce(false)
-            await expect(
-                loginService.login({
-                    email: 'someemail@test.com',
-                    password: 'not a correct password'
-                })
-            ).rejects.toThrow(HttpException)
-        })
-
-        it('should return an exception if login fails', async () => {
-            usersService.findByEmail = jest.fn().mockResolvedValueOnce(null)
-            await expect(
-                loginService.login({
-                    email: 'not a correct email',
-                    password: 'not a correct password'
-                })
-            ).rejects.toThrow(HttpException)
-        })
-    })
-})

+ 0 - 58
src/iam/login/login.service.ts

@@ -1,58 +0,0 @@
-import { HttpException, HttpStatus, Injectable, UnauthorizedException } from '@nestjs/common'
-import { JwtService } from '@nestjs/jwt'
-import { UsersService } from '../../users/users.service'
-import { IUsers } from '../../users/interfaces/users.interface'
-import { LoginDto } from './dto/login.dto'
-import { ConfigService } from '@nestjs/config'
-import { HashingService } from '../../shared/hashing/hashing.service'
-import { JWTPayload } from './interfaces/jwt-payload.interface'
-
-@Injectable()
-export class LoginService {
-    constructor(
-        private readonly usersService: UsersService,
-        private readonly jwtService: JwtService,
-        private readonly configService: ConfigService,
-        private readonly hashingService: HashingService
-    ) {}
-
-    public async findUserByEmail(loginDto: LoginDto): Promise<IUsers> {
-        return await this.usersService.findByEmail(loginDto.email)
-    }
-
-    public async login(loginDto: LoginDto): Promise<any> {
-        try {
-            const user = await this.findUserByEmail(loginDto)
-            if (!user) {
-                throw new UnauthorizedException('User does not exists')
-            }
-
-            const passwordIsValid = await this.hashingService.compare(loginDto.password, user.password)
-
-            if (!passwordIsValid) {
-                throw new UnauthorizedException('Authentication failed. Wrong password')
-            }
-
-            return await this.signToken({
-                name: user.name,
-                email: user.email,
-                id: user.id
-            })
-        } catch (err) {
-            throw new HttpException(err, HttpStatus.BAD_REQUEST)
-        }
-    }
-
-    private async signToken(payload: JWTPayload): Promise<any> {
-        const accessToken = await this.jwtService.signAsync(payload)
-
-        return {
-            sub: payload.id,
-            expiresIn: this.configService.get<string>('JWT_ACCESS_TOKEN_TTL'),
-            audience: this.configService.get<string>('JWT_TOKEN_AUDIENCE'),
-            issuer: this.configService.get<string>('JWT_TOKEN_ISSUER'),
-            accessToken: accessToken,
-            user: payload
-        }
-    }
-}

+ 0 - 3
src/iam/register/dto/register-user.dto.ts

@@ -1,3 +0,0 @@
-import { UserDto } from '../../../users/dto/user.dto'
-
-export class RegisterUserDto extends UserDto {}

+ 0 - 81
src/iam/register/register.controller.spec.ts

@@ -1,81 +0,0 @@
-import { Test, TestingModule } from '@nestjs/testing'
-import { RegisterController } from './register.controller'
-import { RegisterService } from './register.service'
-import { UsersService } from '../../users/users.service'
-import { MailerService } from '../../shared/mailer/mailer.service'
-import { ConfigService } from '@nestjs/config'
-import { RegisterUserDto } from './dto/register-user.dto'
-import { BadRequestException } from '@nestjs/common'
-
-const registerUserDto: RegisterUserDto = {
-    name: 'name #1',
-    username: 'username #1',
-    email: 'test@example.com',
-    password: 'password123'
-}
-
-describe('Register Controller', () => {
-    let registerController: RegisterController
-    let registerService: RegisterService
-
-    beforeEach(async () => {
-        const module: TestingModule = await Test.createTestingModule({
-            controllers: [RegisterController],
-            providers: [
-                RegisterService,
-                {
-                    provide: MailerService,
-                    useValue: {
-                        sendMail: jest.fn()
-                    }
-                },
-                {
-                    provide: ConfigService,
-                    useValue: {
-                        get: jest.fn().mockReturnValue('some string')
-                    }
-                },
-                {
-                    provide: UsersService,
-                    useValue: {
-                        register: jest.fn(() => {})
-                    }
-                },
-                {
-                    provide: RegisterService,
-                    useValue: {
-                        register: jest.fn(() => {})
-                    }
-                }
-            ]
-        }).compile()
-
-        registerController = module.get<RegisterController>(RegisterController)
-        registerService = module.get<RegisterService>(RegisterService)
-    })
-
-    describe('Registration user', () => {
-        it('should be defined', () => {
-            expect(registerController).toBeDefined()
-        })
-
-        it('should call method register in registerService', async () => {
-            const createSpy = jest.spyOn(registerService, 'register')
-
-            await registerController.register(registerUserDto)
-            expect(createSpy).toHaveBeenCalledWith(registerUserDto)
-        })
-
-        it('should throw an exception if it not register fails', async () => {
-            registerService.register = jest.fn().mockRejectedValueOnce(null)
-            await expect(
-                registerController.register({
-                    name: 'not a correct name',
-                    email: 'not a correct email',
-                    username: 'not a correct username',
-                    password: 'not a correct password'
-                })
-            ).rejects.toThrow(BadRequestException)
-        })
-    })
-})

+ 0 - 27
src/iam/register/register.controller.ts

@@ -1,27 +0,0 @@
-import { Controller, Post, Body, HttpStatus, BadRequestException } from '@nestjs/common'
-import { RegisterService } from './register.service'
-import { RegisterUserDto } from './dto/register-user.dto'
-import { ApiTags } from '@nestjs/swagger'
-import { AuthType } from '../login/enums/auth-type.enum'
-import { AuthGuard } from '../login/decorators/auth-guard.decorator'
-
-@ApiTags('auth')
-@AuthGuard(AuthType.None)
-@Controller('auth/register')
-export class RegisterController {
-    constructor(private readonly registerService: RegisterService) {}
-
-    @Post()
-    public async register(@Body() registerUserDto: RegisterUserDto): Promise<any> {
-        try {
-            await this.registerService.register(registerUserDto)
-
-            return {
-                message: 'User registration successfully!',
-                status: HttpStatus.CREATED
-            }
-        } catch (err) {
-            throw new BadRequestException(err, 'Error: User not registration!')
-        }
-    }
-}

+ 0 - 23
src/iam/register/register.module.ts

@@ -1,23 +0,0 @@
-import { Module } from '@nestjs/common'
-import { TypeOrmModule } from '@nestjs/typeorm'
-import { BcryptService } from '../../shared/hashing/bcrypt.service'
-import { HashingService } from '../../shared/hashing/hashing.service'
-import { MailerModule } from '../../shared/mailer/mailer.module'
-import { Users } from '../../users/entities/users.entity'
-import { UsersService } from '../../users/users.service'
-import { RegisterController } from './register.controller'
-import { RegisterService } from './register.service'
-
-@Module({
-    imports: [TypeOrmModule.forFeature([Users]), MailerModule],
-    controllers: [RegisterController],
-    providers: [
-        {
-            provide: HashingService,
-            useClass: BcryptService
-        },
-        RegisterService,
-        UsersService
-    ]
-})
-export class RegisterModule {}

+ 0 - 80
src/iam/register/register.service.spec.ts

@@ -1,80 +0,0 @@
-import { Test, TestingModule } from '@nestjs/testing'
-import { UsersService } from '../../users/users.service'
-import { RegisterService } from './register.service'
-import { Users } from '../../users/entities/users.entity'
-import { getRepositoryToken } from '@nestjs/typeorm'
-import { RegisterUserDto } from './dto/register-user.dto'
-import { HashingService } from '../../shared/hashing/hashing.service'
-import { MailerService } from '../../shared/mailer/mailer.service'
-import { ConfigService } from '@nestjs/config'
-import { Repository } from 'typeorm'
-
-const registerUserDto: RegisterUserDto = {
-    name: 'name #1',
-    username: 'username #1',
-    email: 'test@example.com',
-    password: 'password123'
-}
-
-describe('RegisterService', () => {
-    let service: RegisterService
-    let repository: Repository<Users>
-
-    beforeEach(async () => {
-        const module: TestingModule = await Test.createTestingModule({
-            providers: [
-                RegisterService,
-                {
-                    provide: UsersService,
-                    useValue: {
-                        create: jest.fn().mockResolvedValue(registerUserDto)
-                    }
-                },
-                {
-                    provide: MailerService,
-                    useValue: {
-                        sendMail: jest.fn()
-                    }
-                },
-                {
-                    provide: ConfigService,
-                    useValue: {
-                        get: jest.fn().mockReturnValue('some string')
-                    }
-                },
-                {
-                    provide: HashingService,
-                    useValue: {
-                        hash: jest.fn()
-                    }
-                },
-                {
-                    provide: getRepositoryToken(Users),
-                    useValue: {
-                        save: jest.fn()
-                    }
-                }
-            ]
-        }).compile()
-
-        service = module.get<RegisterService>(RegisterService)
-        repository = module.get<Repository<Users>>(getRepositoryToken(Users))
-    })
-
-    describe('Create user', () => {
-        it('should be defined', () => {
-            expect(service).toBeDefined()
-        })
-
-        it('should create a user during registration', async () => {
-            expect(
-                await service.register({
-                    name: 'name #1',
-                    username: 'username #1',
-                    email: 'test@example.com',
-                    password: 'password123'
-                })
-            ).toEqual(registerUserDto)
-        })
-    })
-})

+ 0 - 43
src/iam/register/register.service.ts

@@ -1,43 +0,0 @@
-import { Injectable, Logger } from '@nestjs/common'
-import { HashingService } from '../../shared/hashing/hashing.service'
-import { MailerService } from '../../shared/mailer/mailer.service'
-import { IUsers } from '../../users/interfaces/users.interface'
-import { UsersService } from '../../users/users.service'
-import { RegisterUserDto } from './dto/register-user.dto'
-
-@Injectable()
-export class RegisterService {
-    constructor(
-        private readonly usersService: UsersService,
-        private readonly mailerService: MailerService,
-        private readonly hashingService: HashingService
-    ) {}
-
-    public async register(registerUserDto: RegisterUserDto): Promise<IUsers> {
-        registerUserDto.password = await this.hashingService.hash(registerUserDto.password)
-
-        this.sendMailRegisterUser(registerUserDto)
-
-        return this.usersService.create(registerUserDto)
-    }
-
-    private sendMailRegisterUser(user): void {
-        try {
-            this.mailerService.sendMail({
-                to: user.email,
-                from: 'from@example.com',
-                subject: 'Registration successful ✔',
-                text: 'Registration successful!',
-                template: 'index',
-                context: {
-                    title: 'Registration successfully',
-                    description: "You did it! You registered!, You're successfully registered.✔",
-                    nameUser: user.name
-                }
-            })
-            Logger.log('[MailService] User Registration: Send Mail successfully!')
-        } catch (err) {
-            Logger.error('[MailService] User Registration: Send Mail failed!', err)
-        }
-    }
-}

+ 12 - 5
src/main.ts

@@ -1,19 +1,23 @@
-import { NestFactory } from '@nestjs/core'
+import { NestFactory, PartialGraphHost } from '@nestjs/core'
 import { AppModule } from './app.module'
 import { Logger, ValidationPipe } from '@nestjs/common'
 import { ConfigService } from '@nestjs/config'
 import { configureSwaggerDocs } from './helpers/configure-swagger-docs.helper'
+import * as fs from 'fs'
 
 async function bootstrap() {
-    const app = await NestFactory.create(AppModule)
+    const app = await NestFactory.create(AppModule, {
+        snapshot: true,
+        abortOnError: false
+    })
     const configService = app.get<ConfigService>(ConfigService)
 
     app.setGlobalPrefix('api')
     app.useGlobalPipes(
         new ValidationPipe({
-            whitelist: true,
+            whitelist: false,
             transform: true,
-            forbidNonWhitelisted: true,
+            forbidNonWhitelisted: false,
             transformOptions: {
                 enableImplicitConversion: true
             }
@@ -31,4 +35,7 @@ async function bootstrap() {
     await app.listen(port)
     Logger.log(`Url for OpenApi: ${await app.getUrl()}/docs`, 'Swagger')
 }
-bootstrap()
+bootstrap().catch((err) => {
+    fs.writeFileSync('graph.json', PartialGraphHost.toString() ?? '')
+    process.exit(1)
+})

+ 4 - 0
src/model/role.enum.ts

@@ -0,0 +1,4 @@
+export enum Role {
+    User = 'user',
+    Admin = 'admin'
+}

+ 3 - 3
src/sms/sms.controller.ts

@@ -1,21 +1,21 @@
 import { Body, Controller, Post } from '@nestjs/common'
 import { ApiTags } from '@nestjs/swagger'
-import { AuthGuard } from 'src/iam/login/decorators/auth-guard.decorator'
-import { AuthType } from 'src/iam/login/enums/auth-type.enum'
 import { SendCodeDto, VerifyCodeDto } from './dto/sms.dto'
 import { SmsService } from './sms.service'
+import { Public } from 'src/auth/public.decorator'
 
 @ApiTags('sms')
-@AuthGuard(AuthType.None)
 @Controller('/sms')
 export class SmsController {
     constructor(private readonly smsService: SmsService) {}
 
+    @Public()
     @Post('/sendVerify')
     public async sendVerify(@Body() body: SendCodeDto) {
         return await this.smsService.sendVerify(body.phone)
     }
 
+    @Public()
     @Post('/verify')
     public async verify(@Body() body: VerifyCodeDto) {
         return {

+ 2 - 2
src/sms/sms.module.ts

@@ -1,8 +1,8 @@
 import { Module } from '@nestjs/common'
-import { AliyunModule } from 'src/aliyun/aliyun.module'
+import { TypeOrmModule } from '@nestjs/typeorm'
+import { AliyunModule } from '../aliyun/aliyun.module'
 import { SmsController } from './sms.controller'
 import { SmsService } from './sms.service'
-import { TypeOrmModule } from '@nestjs/typeorm'
 import { SmsRecord } from './entities/sms.entity'
 
 @Module({

+ 4 - 0
src/users/entities/users.entity.ts

@@ -1,4 +1,5 @@
 import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
+import { Role } from '../../model/role.enum'
 
 @Entity()
 export class Users {
@@ -19,4 +20,7 @@ export class Users {
 
     @Column({ length: 20, unique: true, nullable: true })
     phone: string
+
+    @Column({ type: 'set', enum: Role, default: Role.User })
+    roles: Role[]
 }

+ 7 - 4
src/users/users.controller.ts

@@ -7,22 +7,25 @@ import {
     HttpStatus,
     NotFoundException,
     Delete,
-    BadRequestException
+    BadRequestException,
+    Req
 } from '@nestjs/common'
 import { UsersService } from './users.service'
 import { UserProfileDto } from './dto/user-profile.dto'
 import { UserUpdateDto } from './dto/user-update.dto'
 import { IUsers } from './interfaces/users.interface'
 import { ApiTags } from '@nestjs/swagger'
-import { AuthGuard } from '../iam/login/decorators/auth-guard.decorator'
-import { AuthType } from '../iam/login/enums/auth-type.enum'
 
 @ApiTags('users')
-@AuthGuard(AuthType.Bearer)
 @Controller('users')
 export class UsersController {
     constructor(private readonly usersService: UsersService) {}
 
+    @Get('/my')
+    public async my(@Req() req): Promise<IUsers> {
+        return this.usersService.findById(req.user.userId)
+    }
+
     @Get()
     public async findAllUser(): Promise<IUsers[]> {
         return this.usersService.findAll()

+ 4 - 4
src/users/users.module.ts

@@ -3,13 +3,12 @@ import { TypeOrmModule } from '@nestjs/typeorm'
 import { Users } from './entities/users.entity'
 import { UsersService } from './users.service'
 import { UsersController } from './users.controller'
-import { MailerModule } from '../shared/mailer/mailer.module'
 import { BcryptService } from '../shared/hashing/bcrypt.service'
 import { HashingService } from '../shared/hashing/hashing.service'
-import { AliyunModule } from 'src/aliyun/aliyun.module'
+import { SmsModule } from '../sms/sms.module'
 
 @Module({
-    imports: [TypeOrmModule.forFeature([Users]), MailerModule, AliyunModule],
+    imports: [SmsModule, TypeOrmModule.forFeature([Users])],
     controllers: [UsersController],
     providers: [
         {
@@ -17,6 +16,7 @@ import { AliyunModule } from 'src/aliyun/aliyun.module'
             useClass: BcryptService
         },
         UsersService
-    ]
+    ],
+    exports: [UsersService]
 })
 export class UsersModule {}

+ 2 - 1
src/users/users.service.ts

@@ -54,7 +54,7 @@ export class UsersService {
         return user
     }
 
-    public async loginByPhone(phone: string, code: string) {
+    public async loginByPhone(phone: string, code: string, invitor: number | null): Promise<Users> {
         const verified = await this.smsService.verify(phone, code)
         if (!verified) {
             throw new InternalServerErrorException('手机号或验证码错误')
@@ -66,6 +66,7 @@ export class UsersService {
             user.name = '0x' + randomstring.generate({ length: 8, charset: 'alphanumeric' })
             user.username = phone
         }
+        return await this.userRepository.save(user)
     }
 
     public async create(userDto: UserDto): Promise<IUsers> {

+ 50 - 3
yarn.lock

@@ -825,6 +825,14 @@
     path-to-regexp "3.2.0"
     tslib "2.5.0"
 
+"@nestjs/devtools-integration@^0.1.4":
+  version "0.1.4"
+  resolved "https://registry.npmmirror.com/@nestjs/devtools-integration/-/devtools-integration-0.1.4.tgz#e739b5afb88a13615944030e694c448e7dde5223"
+  integrity sha512-jAKTrpc+Ilrb7CFV1ZuG9b4OYVlFPHUXna2H8BrmxKResyqnzlzR/YIUr8zJE7p15MipAjiVaLHHyEL0C9OYGA==
+  dependencies:
+    chalk "^4.1.2"
+    node-fetch "^2.6.9"
+
 "@nestjs/jwt@^10.0.1":
   version "10.0.3"
   resolved "https://registry.npmmirror.com/@nestjs/jwt/-/jwt-10.0.3.tgz#e74e992cde99df266616c8bedf2404898eec4819"
@@ -838,6 +846,11 @@
   resolved "https://registry.npmmirror.com/@nestjs/mapped-types/-/mapped-types-1.2.2.tgz#d9ddb143776e309dbc1a518ac1607fddac1e140e"
   integrity sha512-3dHxLXs3M0GPiriAcCFFJQHoDFUuzTD5w6JDhE7TyfT89YKpe6tcCCIqOZWdXmt9AZjjK30RkHRSFF+QEnWFQg==
 
+"@nestjs/passport@^9.0.3":
+  version "9.0.3"
+  resolved "https://registry.npmmirror.com/@nestjs/passport/-/passport-9.0.3.tgz#4df0e6de3176e04a5770cb432e58f129c8e49f9e"
+  integrity sha512-HplSJaimEAz1IOZEu+pdJHHJhQyBOPAYWXYHfAPQvRqWtw4FJF1VXl1Qtk9dcXQX1eKytDtH+qBzNQc19GWNEg==
+
 "@nestjs/platform-express@^9.3.3":
   version "9.4.0"
   resolved "https://registry.npmmirror.com/@nestjs/platform-express/-/platform-express-9.4.0.tgz#e1f9e6c60cdd8d7889abbc6a04ab95279976175b"
@@ -3741,7 +3754,7 @@ jsonfile@^6.0.1:
   optionalDependencies:
     graceful-fs "^4.1.6"
 
-jsonwebtoken@9.0.0:
+jsonwebtoken@9.0.0, jsonwebtoken@^9.0.0:
   version "9.0.0"
   resolved "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz#d0faf9ba1cc3a56255fe49c0961a67e520c1926d"
   integrity sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==
@@ -4156,7 +4169,7 @@ node-emoji@1.11.0:
   dependencies:
     lodash "^4.17.21"
 
-node-fetch@^2.6.1, node-fetch@^2.6.7:
+node-fetch@^2.6.1, node-fetch@^2.6.7, node-fetch@^2.6.9:
   version "2.6.9"
   resolved "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6"
   integrity sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==
@@ -4355,6 +4368,35 @@ parseurl@~1.3.3:
   resolved "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
   integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
 
+passport-http-bearer@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.npmmirror.com/passport-http-bearer/-/passport-http-bearer-1.0.1.tgz#147469ea3669e2a84c6167ef99dbb77e1f0098a8"
+  integrity sha512-SELQM+dOTuMigr9yu8Wo4Fm3ciFfkMq5h/ZQ8ffi4ELgZrX1xh9PlglqZdcUZ1upzJD/whVyt+YWF62s3U6Ipw==
+  dependencies:
+    passport-strategy "1.x.x"
+
+passport-jwt@^4.0.1:
+  version "4.0.1"
+  resolved "https://registry.npmmirror.com/passport-jwt/-/passport-jwt-4.0.1.tgz#c443795eff322c38d173faa0a3c481479646ec3d"
+  integrity sha512-UCKMDYhNuGOBE9/9Ycuoyh7vP6jpeTp/+sfMJl7nLff/t6dps+iaeE0hhNkKN8/HZHcJ7lCdOyDxHdDoxoSvdQ==
+  dependencies:
+    jsonwebtoken "^9.0.0"
+    passport-strategy "^1.0.0"
+
+passport-strategy@1.x.x, passport-strategy@^1.0.0:
+  version "1.0.0"
+  resolved "https://registry.npmmirror.com/passport-strategy/-/passport-strategy-1.0.0.tgz#b5539aa8fc225a3d1ad179476ddf236b440f52e4"
+  integrity sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==
+
+passport@^0.6.0:
+  version "0.6.0"
+  resolved "https://registry.npmmirror.com/passport/-/passport-0.6.0.tgz#e869579fab465b5c0b291e841e6cc95c005fac9d"
+  integrity sha512-0fe+p3ZnrWRW74fe8+SvCyf4a3Pb2/h7gFkQ8yTJpAO50gDzlfjZUZTO1k5Eg9kUct22OxHLqDZoKUWRHOh9ug==
+  dependencies:
+    passport-strategy "1.x.x"
+    pause "0.0.1"
+    utils-merge "^1.0.1"
+
 path-exists@^4.0.0:
   version "4.0.0"
   resolved "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
@@ -4398,6 +4440,11 @@ path-type@^4.0.0:
   resolved "https://registry.npmmirror.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
   integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
 
+pause@0.0.1:
+  version "0.0.1"
+  resolved "https://registry.npmmirror.com/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d"
+  integrity sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==
+
 picocolors@^1.0.0:
   version "1.0.0"
   resolved "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
@@ -5341,7 +5388,7 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1:
   resolved "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
   integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
 
-utils-merge@1.0.1:
+utils-merge@1.0.1, utils-merge@^1.0.1:
   version "1.0.1"
   resolved "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
   integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==