{"_id":"@apihub24/jwt-generator","_rev":"5-139a2974f1da4eda31e3c39d285d36b5","name":"@apihub24/jwt-generator","dist-tags":{"latest":"2.0.0-alpha.0"},"versions":{"1.0.0":{"name":"@apihub24/jwt-generator","version":"1.0.0","keywords":[],"author":{"url":"https://git.apihub24.de/","name":"Markus Morgenstern","email":"markusmorgenstern87@outlook.de"},"license":"MIT","_id":"@apihub24/jwt-generator@1.0.0","maintainers":[{"name":"apihub24","email":"markusmorgenstern87@outlook.de"}],"dist":{"shasum":"5a0bd2aba831eb7b248bab4fd1828f28434d9a1f","tarball":"https://registry.npmjs.org/@apihub24/jwt-generator/-/jwt-generator-1.0.0.tgz","fileCount":12,"integrity":"sha512-XNGKw7wCekJSoF5X4eu/mTgrItLyIW01tyyEgd39dzP8jQgGV2QasRtS0IcmDDcMQ6VwdZHF2yCpqg4W5F8bzg==","signatures":[{"sig":"MEUCIDCD+kArwcT3jd93o9gbP1RHe1L494iqCeXUoc4E6tCYAiEApnkX2tlQCjyrzjrGfplWUlSRAgitn3CYqqRjhnN9bTY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116993},"main":"dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc"},"_npmUser":{"name":"apihub24","email":"markusmorgenstern87@outlook.de"},"_npmVersion":"10.9.3","description":"","directories":{},"_nodeVersion":"22.18.0","dependencies":{"jsonwebtoken":"^9.0.2","@nestjs/common":"^11.1.6","@nestjs/config":"^4.0.2","@apihub24/token-authentication":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/jwt-generator_1.0.0_1755723131687_0.5004649063678686","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@apihub24/jwt-generator","version":"1.0.1","keywords":[],"author":{"url":"https://git.apihub24.de/","name":"Markus Morgenstern","email":"markusmorgenstern87@outlook.de"},"license":"MIT","_id":"@apihub24/jwt-generator@1.0.1","maintainers":[{"name":"apihub24","email":"markusmorgenstern87@outlook.de"}],"dist":{"shasum":"00f6c3eedd95746628cc1834cbe098cf362ddb12","tarball":"https://registry.npmjs.org/@apihub24/jwt-generator/-/jwt-generator-1.0.1.tgz","fileCount":14,"integrity":"sha512-QjsHySNW5c+YjOxjWEik+dsXKUwrgyoYDuyejkHPayxm8Gy1pJfhTJXbA1GAuf3ZwSxJnLqhpFCjxCtvPVCtPw==","signatures":[{"sig":"MEUCIBbhPmNRTwJwYfPGSiHDHw9xIapaXwJ/wL6yEUBKS5shAiEAvfRNVIhlbR/CAFHOuvxRXh+He1xrCJdKr6O6EI1Bytg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":185573},"jest":{"roots":["<rootDir>/src/"],"rootDir":".","testRegex":".*\\.spec\\.ts$","transform":{"^.+\\.(t|j)s$":"ts-jest"},"testEnvironment":"node","moduleNameMapper":{},"coverageDirectory":"./coverage","collectCoverageFrom":["**/*.(t|j)s"],"moduleFileExtensions":["js","json","ts"]},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"e7d7f47b53a761a875c5e099c2d0a402afcf6cbb","scripts":{"pub":"npm publish","rel":"npm i && npm run build && npm run test:coverage","test":"jest","build":"rimraf ./dist && tsc","test:coverage":"jest --coverage"},"_npmUser":{"name":"apihub24","email":"markusmorgenstern87@outlook.de"},"_npmVersion":"10.9.3","description":"A NestJs Library to generate JWTs.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"jsonwebtoken":"^9.0.2","@nestjs/common":"^11.1.6","@nestjs/config":"^4.0.2","@apihub24/token-authentication":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.0","rimraf":"^6.0.1","ts-jest":"^29.4.1","typescript":"^5.9.2","@types/jest":"^30.0.0","@nestjs/testing":"^11.1.6"},"_npmOperationalInternal":{"tmp":"tmp/jwt-generator_1.0.1_1755805540558_0.9054213078034372","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@apihub24/jwt-generator","version":"1.0.2","keywords":[],"author":{"url":"https://git.apihub24.de/","name":"Markus Morgenstern","email":"markusmorgenstern87@outlook.de"},"license":"MIT","_id":"@apihub24/jwt-generator@1.0.2","maintainers":[{"name":"apihub24","email":"markusmorgenstern87@outlook.de"}],"dist":{"shasum":"8e2e7dbb60e281659e9f36ccd53bbb67ff0799fe","tarball":"https://registry.npmjs.org/@apihub24/jwt-generator/-/jwt-generator-1.0.2.tgz","fileCount":14,"integrity":"sha512-GAOLLuxAf9yS6tlPXsoxOulvr6xdDqgC3BXA+BRRTYlnDTrD/VVL0qVUJngYh3MmCXxP4Lj275xcI3d1LwxsNA==","signatures":[{"sig":"MEQCIH3wloctgvEBUHiFbqxULa4NDo5BVoFHmA0tgQ5aLWrAAiBLHo5SMuT8ayjxvDX0i59ToWAK3EJR97CXezpHCHLvow==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":185573},"jest":{"roots":["<rootDir>/src/"],"rootDir":".","testRegex":".*\\.spec\\.ts$","transform":{"^.+\\.(t|j)s$":"ts-jest"},"testEnvironment":"node","moduleNameMapper":{},"coverageDirectory":"./coverage","collectCoverageFrom":["**/*.(t|j)s"],"moduleFileExtensions":["js","json","ts"]},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"e7d7f47b53a761a875c5e099c2d0a402afcf6cbb","scripts":{"pub":"npm publish","rel":"npm i && npm run build && npm run test:coverage","test":"jest","build":"rimraf ./dist && tsc","test:coverage":"jest --coverage"},"_npmUser":{"name":"apihub24","email":"markusmorgenstern87@outlook.de"},"_npmVersion":"10.9.3","description":"A NestJs Library to generate JWTs.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"jsonwebtoken":"^9.0.2","@nestjs/common":"^11.1.6","@nestjs/config":"^4.0.2","@apihub24/token-authentication":"^1.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.0","rimraf":"^6.0.1","ts-jest":"^29.4.1","typescript":"^5.9.2","@types/jest":"^30.0.0","@nestjs/testing":"^11.1.6"},"_npmOperationalInternal":{"tmp":"tmp/jwt-generator_1.0.2_1755806032838_0.20176966261347307","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@apihub24/jwt-generator","version":"1.0.4","keywords":[],"author":{"url":"https://git.apihub24.de/","name":"Markus Morgenstern","email":"markusmorgenstern87@outlook.de"},"license":"MIT","_id":"@apihub24/jwt-generator@1.0.4","maintainers":[{"name":"apihub24","email":"markusmorgenstern87@outlook.de"}],"dist":{"shasum":"8fd6530ae899cea5a44006cb6e358d22b2ed1a44","tarball":"https://registry.npmjs.org/@apihub24/jwt-generator/-/jwt-generator-1.0.4.tgz","fileCount":14,"integrity":"sha512-0BSDYzd1Eksli75pa4AZQ8jY8QW9vAzuCPidkmEQ1LntMrxnUTBLpZc8b7XpJcOh1Fh3CX16IkRVZuKrSlKLXw==","signatures":[{"sig":"MEUCIQCi4C0zw9MOhj0SeDLfh27Tm7erHsJMT4tToX9HzNw0oQIgCz8Mo6TO/ZQ/tgHS0TrxOtC8q1Rqq8HIHVZMaSVphpA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":163689},"jest":{"roots":["<rootDir>/src/"],"rootDir":".","testRegex":".*\\.spec\\.ts$","transform":{"^.+\\.(t|j)s$":"ts-jest"},"testEnvironment":"node","moduleNameMapper":{},"coverageDirectory":"./coverage","collectCoverageFrom":["**/*.(t|j)s"],"moduleFileExtensions":["js","json","ts"]},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"497bee71609fedf10d1a72713db685443414385b","scripts":{"pub":"npm publish","rel":"npm i && npm run build && npm run test:coverage","test":"jest","build":"rimraf ./dist && tsc","test:coverage":"jest --coverage"},"_npmUser":{"name":"apihub24","email":"markusmorgenstern87@outlook.de"},"_npmVersion":"10.9.3","description":"A NestJs Library to generate JWTs.","directories":{},"_nodeVersion":"22.18.0","dependencies":{"jsonwebtoken":"^9.0.2","@nestjs/common":"^11.1.6","@nestjs/config":"^4.0.2","@apihub24/authentication":"^1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.0","rimraf":"^6.0.1","ts-jest":"^29.4.1","typescript":"^5.9.2","@types/jest":"^30.0.0","@nestjs/testing":"^11.1.6"},"_npmOperationalInternal":{"tmp":"tmp/jwt-generator_1.0.4_1755984351667_0.05110339202658354","host":"s3://npm-registry-packages-npm-production"}},"2.0.0-alpha.0":{"name":"@apihub24/jwt-generator","version":"2.0.0-alpha.0","description":"A NestJs Library to generate JWTs.","main":"dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"rimraf ./dist && tsc","test":"jest","test:coverage":"jest --coverage","pub":"npm publish","rel":"npm i && npm run build && npm run test:coverage"},"dependencies":{"@nestjs/common":"^11.1.6","@nestjs/config":"^4.0.2","jsonwebtoken":"^9.0.2","@apihub24/authentication":"2.0.0-alpha.0"},"devDependencies":{"rimraf":"^6.0.1","@nestjs/testing":"^11.1.6","typescript":"^5.9.2","@types/jest":"^30.0.0","jest":"^30.0.0","ts-jest":"^29.4.1"},"keywords":[],"author":{"name":"Markus Morgenstern","email":"markusmorgenstern87@outlook.de","url":"https://git.apihub24.de/"},"license":"MIT","publishConfig":{"access":"public"},"jest":{"moduleFileExtensions":["js","json","ts"],"rootDir":".","testRegex":".*\\.spec\\.ts$","transform":{"^.+\\.(t|j)s$":"ts-jest"},"collectCoverageFrom":["**/*.(t|j)s"],"coverageDirectory":"./coverage","testEnvironment":"node","roots":["<rootDir>/src/"],"moduleNameMapper":{}},"_id":"@apihub24/jwt-generator@2.0.0-alpha.0","gitHead":"956cfaf0616a7bb3e9852446da71da45d1750837","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-rG1EG6mKFLwcu24vDs1IBdy2AbhiYaSXSrbQ9AwWBXbhusKqpykyWJFvqyowRx+O0p+ubWNBA6jT5+hOgaAAFw==","shasum":"3dbb7f7e84c3b42293a64c97d78c49b1115ff62f","tarball":"https://registry.npmjs.org/@apihub24/jwt-generator/-/jwt-generator-2.0.0-alpha.0.tgz","fileCount":14,"unpackedSize":163704,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEKKK1NGPOtaaQlridLhK4BhoyRF4wkUDAuuHAfK9HcZAiBNN4BYodmjkCvjXsDK4Jgk7IY9BNtOULzT1QyBvvTq6A=="}]},"_npmUser":{"name":"apihub24","email":"markusmorgenstern87@outlook.de"},"directories":{},"maintainers":[{"name":"apihub24","email":"markusmorgenstern87@outlook.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jwt-generator_2.0.0-alpha.0_1756144987295_0.6687829669789136"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-20T20:52:11.577Z","modified":"2025-08-25T18:03:07.834Z","1.0.0":"2025-08-20T20:52:11.906Z","1.0.1":"2025-08-21T19:45:40.758Z","1.0.2":"2025-08-21T19:53:53.037Z","1.0.4":"2025-08-23T21:25:51.849Z","2.0.0-alpha.0":"2025-08-25T18:03:07.598Z"},"author":{"name":"Markus Morgenstern","email":"markusmorgenstern87@outlook.de","url":"https://git.apihub24.de/"},"license":"MIT","keywords":[],"description":"A NestJs Library to generate JWTs.","maintainers":[{"name":"apihub24","email":"markusmorgenstern87@outlook.de"}],"readme":"# Jwt Generator\r\n\r\nA NestJs Library to generate JWTs.\r\n\r\n## Install\r\n\r\n```bash\r\nnpm i --save @apihub24/jwt-generator\r\n```\r\n\r\n## Requirements\r\n\r\n| Dependency                | Description                                                |\r\n| ------------------------- | ---------------------------------------------------------- |\r\n| @nestjs/config            | use the NestJs Config Module to get some keys listed below |\r\n| @apihub24/session_service | used to create new Sessions when a new Token was created   |\r\n| JWT_SECRET                | NestJs Config Key for Secret used to Sign JWT              |\r\n| JWT_ISSUER                | NestJs Config Key for the JWT Issuer                       |\r\n| JWT_AUDIENCE              | NestJs Config Key for the JWT Audience                     |\r\n\r\n## Usage\r\n\r\n```typescript\r\nimport {\r\n  JwtGeneratorModule,\r\n  JwtService,\r\n  APIHUB24_TOKEN_SERVICE_INJECTION_KEY,\r\n} from \"@apihub24/jwt-generator\";\r\n// we use the @apihub24/session_service implementation from the InMemorySessionsModule\r\nimport { InMemorySessionsModule } from \"@apihub24/in-memory-sessions\";\r\n// use the takeExportedProviders function from NestJs Helper Module to select the exported Providers\r\nimport { takeExportedProviders } from \"@apihub24/nestjs-helper\";\r\n\r\n// use JwtGeneratorModule\r\nconst inMemorySessionsModule = InMemorySessionsModule.forRoot();\r\nconst jwtGeneratorModule = JwtGeneratorModule.forRoot([\r\n  ...takeExportedProviders(inMemorySessionsModule),\r\n]);\r\n\r\n@Module({\r\n  imports: [jwtGeneratorModule],\r\n})\r\n\r\n// now you can inject the service with injection Token\r\nimport * as tokenAuthentication from \"@apihub24/token-authentication\";\r\n\r\nexport class Test {\r\n  constructor(\r\n    @Inject(APIHUB24_TOKEN_SERVICE_INJECTION_KEY) jwtGenerator: JwtService\r\n  );\r\n\r\n  async test(session: tokenAuthentication.ISession) {\r\n    const token = await this.jwtGenerator.generate(session);\r\n  }\r\n}\r\n```\r\n","readmeFilename":"README.md"}