{"name":"@node-ntlm/core","version":"0.2.0","license":"MIT","description":"NTLM node utility function","repository":{"type":"git","url":"git+https://github.com/skrtheboss/node-ntlm.git","directory":"packages/core"},"bugs":{"url":"https://github.com/skrtheboss/node-ntlm/issues"},"keywords":["ntlm","md4","des","node18","node16","node","iis"],"type":"commonjs","engines":{"node":">=16.19.0"},"dependencies":{"des.js":"^1.0.1","js-md4":"^0.3.2","tslib":"^2.5.0"},"gitHead":"36c42b05a3fea3d2cc3cafc39295866bf40547d6","main":"./src/index.js","types":"./src/index.d.ts","homepage":"https://github.com/skrtheboss/node-ntlm#readme","_id":"@node-ntlm/core@0.2.0","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-TumGeYlgy1I06kgDwM8FJccXZ51lGwQzgEEoqm/dXfZ3METnBQ6K3w1SmKKUn9WnMZ6fBo2hNq1m1uDIiWl73w==","shasum":"10f4a645f5340a2c513dd9f06398aea1a52ffb49","tarball":"http://registry-npm.ywwl.com/@node-ntlm/core/download/@node-ntlm/core-0.2.0.tgz","fileCount":19,"unpackedSize":50437,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjSW37dukyX0QxxF5B+Uzx7Zx9K1CmCTiWRQF5wpo48AIgGecjNreZ7Rmr0T92jl0KOOgzv0N0q3fyrjfwo9+ubuw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4YJLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4IxAAlw2+YWC4pdYH7o9OMRSg5j0eUgN9B7EaPMWJGgglsyUtycKy\r\nemqu5AJAY6JK3LEP6uaUEupPJoT3VMlwIK295pX9Nl8S01GgPFG1sdEljiA+\r\nbdnDzA8JR4WMLeRGfKGgUUfqDJwFwIQQDB/AtfiSjIWKQi1HFDs/LFGPmkS/\r\ndngYGmqHTJ3XeMvdkXf2k5VvPl6VqQALz5zhCPc0L1BMQauOLNcEO4A/6puS\r\nk4AuBHhMf9YsAYrTjYWQbhMwct0FVvlrY8lSf79UjQAVzgQ2A/6v/M0mK5Ja\r\nwaeG4WXsvTngGZUp1k4TqiEedF/fhnyFsAnB2LunvqiEeVUZxYlYK9JXbyZu\r\nJbCesW/A9Jve/zhROUnAFL9++XpI/uO2/TQk/kXJfeGqwq7cnyNpSgCfhdr3\r\nvrAJHhbbYHvnuC+qrjbCjAS8uPmvrsU/LoyzNEFjiNIAhu37sxtWxwmZArti\r\nDvIUiDwR75gn40CbURQcZ+ZsbYAQIOIyGWT8t1oSTBQazHs4/8y8ddDS+BYf\r\n9zFkndX/wlfLSwlgaX3B8KGRtjGkVuiRirU0cJpSocdDM0pRsN95pHmoKVxU\r\nl0G/p2IX1m7GzWPmIvH4TdNfGFon7ZY/37l3HTTHvaQgo3FFr6roQQdvc5Z9\r\nTbGnoUny3KCg+X8As5z7K6ZVAgbvtiXQ8dc=\r\n=Pbyg\r\n-----END PGP SIGNATURE-----\r\n","size":11292,"noattachment":false,"key":"/@node-ntlm/core/-/@node-ntlm/core-0.2.0.tgz"},"_npmUser":{"name":"skrtheboss","email":"denisfrenademetz97@gmail.com"},"directories":{},"maintainers":[{"name":"skrtheboss","email":"denisfrenademetz97@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/core_0.2.0_1675723339646_0.6764689164767417"},"_hasShrinkwrap":false,"readme":"# @node-ntlm/core\n\n<p align=\"center\">\n  <a href=\"https://nodejs.org/\">\n    <img alt=\"NodeJs Support\" src=\"https://img.shields.io/node/v/@node-ntlm/core?style=flat-square&logo=Node.js\">\n  </a>\n  <a href=\"https://www.npmjs.com/package/@node-ntlm/core\">\n    <img alt=\"weekly downloads from npm\" src=\"https://img.shields.io/npm/dw/@node-ntlm/core.svg?style=flat-square\">\n  </a>\n  <a href=\"https://renovatebot.com/\">\n    <img alt=\"Renovate Bot\" src=\"https://img.shields.io/badge/renovate-enabled-brightgreen.svg?style=flat-square\">\n  </a>\n  <a href=\"https://snyk.io/advisor/npm-package/@node-ntlm/core\">\n    <img alt=\"SNYK Report\" src=\"https://img.shields.io/snyk/vulnerabilities/npm/@node-ntlm/core?style=flat-square\">\n  </a>\n  <a href=\"https://www.npmjs.org/package/@node-ntlm/core\">\n    <img alt=\"npm version\" src=\"http://img.shields.io/npm/v/@node-ntlm/core.svg?style=flat-square&logo=npm\">\n  </a>\n  <br/>\n  <a href=\"https://bundlephobia.com/result?p=@node-ntlm/core\">\n    <img alt=\"Minified size\" src=\"https://img.shields.io/bundlephobia/min/@node-ntlm/core?style=flat-square\">\n  </a>\n  <a href=\"https://bundlephobia.com/result?p=@node-ntlm/coree\">\n    <img alt=\"Minified-Zipped size\" src=\"https://img.shields.io/bundlephobia/minzip/@node-ntlm/core?style=flat-square\">\n  </a>\n  <a href=\"https://github.com/semantic-release/semantic-release\">\n    <img alt=\"Semantic Release\" src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-blue.svg?style=flat-square\">\n  </a>\n  <a href=\"https://github.com/prettier/prettier\">\n    <img alt=\"code style: prettier\" src=\"https://img.shields.io/badge/code%20style-prettier-blue?style=flat-square&logo=Prettier\">\n  </a>\n  <a href=\"https://github.com/skrtheboss/node-ntlm/blob/master/LICENSE\">\n    <img alt=\"Mit License\" src=\"https://img.shields.io/npm/l/@node-ntlm/core?color=blue&style=flat-square\">\n  </a>\n</p>\n\n**@node-ntlm/core** is a Node.js NTLM utility package\n\nIt's heavily inspired from [httpntlm](https://github.com/SamDecrock/node-http-ntlm) written in typescript and with nodejs 18 support.\n\n## Install\n\nYou can install **@node-ntlm/core** using the Node Package Manager (npm):\n\n    npm install @node-ntlm/core\n\n## How to use\n\n```typescript\nimport {\n    createType1Message,\n    createType3Message,\n    extractNtlmMessageFromAuthenticateHeader,\n    parseType2Message,\n} from '@node-ntlm/core';\nimport { fetch } from 'undici';\n\nconst negotiateMessage = createType1Message({ domain: 'test.host', workstation: 'pc1' });\n\nconst negotiateResponse = await fetch('http://test-service.url/api', {\n    headers: { authorization: negotiateMessage },\n    keepalive: true,\n});\n\nconst type2Message = extractNtlmMessageFromAuthenticateHeader(negotiateResponse.headers.get('www-authenticate'));\n\nif (!type2Message) {\n    throw new Error('Could not find type 2 message on response headers!');\n}\n\nconst authMessage = createType3Message(parseType2Message(type2Message), {\n    domain: 'test.host',\n    workstation: 'pc1',\n    username: 'test',\n    password: 'test',\n});\n\nconst result = await fetch('http://test-service.url/api', {\n    headers: { Authorization: authMessage },\n    keepalive: false,\n});\n\nconsole.log(await result.json());\n```\n\n# @node-ntlm/core/testing\n\n## Usage:\n\n```typescript\nimport { generateNegotiateResponse } from '@node-ntlm/core/testing';\n\nconst negotiateRespnse = generateNegotiateResponse(...getAuthorization header somewhere)\n```\n","publish_time":1675723339858,"_cnpm_publish_time":1675723339858,"dist-tags":{"latest":"0.3.2"}}