make global module
This commit is contained in:
parent
60ef75ef7c
commit
737d69e788
@ -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
4
package-lock.json
generated
@ -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",
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user