make global module

This commit is contained in:
admin 2025-08-22 16:11:42 +02:00
parent 60ef75ef7c
commit 737d69e788
4 changed files with 9 additions and 4 deletions

View File

@ -14,6 +14,10 @@ npm i --save @apihub24/password-hasher
| -------------- | ------------------------------------------------------------------------------------------------- |
| @nestjs/config | use the NestJs Config Module to get the Password Salt Rounds with key _PASSWORD_HASH_SALT_ROUNDS_ |
| Exported Injection Keys |
| -------------------------- |
| @apihub24/password_service |
## Usage
```typescript

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@apihub24/password-hasher",
"version": "1.0.6",
"version": "1.0.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@apihub24/password-hasher",
"version": "1.0.6",
"version": "1.0.8",
"license": "MIT",
"dependencies": {
"@apihub24/token-authentication": "^1.0.4",

View File

@ -1,6 +1,6 @@
{
"name": "@apihub24/password-hasher",
"version": "1.0.7",
"version": "1.0.8",
"description": "",
"main": "dist/index.js",
"types": "./dist/index.d.ts",

View File

@ -1,10 +1,11 @@
import { DynamicModule, Module } from "@nestjs/common";
import { DynamicModule, Global, Module } from "@nestjs/common";
import { PasswordHashService } from "./password.hash.service";
import { ConfigModule } from "@nestjs/config";
export const APIHUB24_PASSWORD_SERVICE_INJECTION_KEY =
"@apihub24/password_service";
@Global()
@Module({})
export class PasswordHasherModule {
static forRoot(): DynamicModule {