{"_id":"@tryjsky/ntlm2","name":"@tryjsky/ntlm2","dist-tags":{"latest":"0.3.1"},"versions":{"0.3.1":{"name":"@tryjsky/ntlm2","version":"0.3.1","description":"ntlm2 with Node v17 patch.","keywords":["ntlm","ntlmv2","client","authentication"],"main":"./lib/index.js","author":{"name":"Y., Ryota","email":"tryjsky@gmail.com","url":"https://github.com/tryjsky"},"repository":{"type":"git","url":"git+https://github.com/tryjsky/node-ntlm-client.git"},"bugs":{"url":"https://github.com/tryjsky/node-ntlm-client/issues"},"license":"MIT","dependencies":{"extend":"^3.0.0","js-md4":"^0.3.2"},"gitHead":"457ce1b85f4af7135d075c2e21185c41254c00f4","homepage":"https://github.com/tryjsky/node-ntlm-client#readme","_id":"@tryjsky/ntlm2@0.3.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-ZyfK8LHfc/8qLm3v7vE5zpIpcSsAMmx9ufq9aHdfmS12Xrf6nKhxlz2vkESkTCV5xggSrJ3w0Vepw0qSYAT+Yw==","shasum":"24ac983e0e34b86ba66c1d4a5d552d3a57edca6a","tarball":"https://registry.npmjs.org/@tryjsky/ntlm2/-/ntlm2-0.3.1.tgz","fileCount":9,"unpackedSize":22049,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDn6DMPRYYBzVXvdtheawtlieGg0tExRy0ZXqJo3wApHAIhAMh09UPpkvZ3fhQUyJ6XmN3e+I0/VdYX/y2jjg4BhPfx"}]},"_npmUser":{"name":"tryjsky","email":"tryjsky@gmail.com"},"directories":{},"maintainers":[{"name":"tryjsky","email":"tryjsky@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ntlm2_0.3.1_1688121081979_0.6102565802640696"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-30T10:31:21.920Z","0.3.1":"2023-06-30T10:31:22.166Z","modified":"2023-06-30T10:31:22.341Z"},"maintainers":[{"name":"tryjsky","email":"tryjsky@gmail.com"}],"description":"ntlm2 with Node v17 patch.","homepage":"https://github.com/tryjsky/node-ntlm-client#readme","keywords":["ntlm","ntlmv2","client","authentication"],"repository":{"type":"git","url":"git+https://github.com/tryjsky/node-ntlm-client.git"},"author":{"name":"Y., Ryota","email":"tryjsky@gmail.com","url":"https://github.com/tryjsky"},"bugs":{"url":"https://github.com/tryjsky/node-ntlm-client/issues"},"license":"MIT","readme":"# Diff\n\n[ntlm2](https://github.com/v9u/node-ntlm-client) with Node v17 patch.\n\n# ntlm-client\n\nA node.js NTLM client with support for NTLM and NTLMv2 authentication\n\n```\nnpm install ntlm2\n```\n\n## API\n\n#### request(options)\n\nA convenience function that tries to authenticate against a given URL using the `request` module.\nIf NTLM is not supported, it will fallback to Basic Auth.\n\n* Arguments\n  * `options` an object holding below options for the authentication process:\n    * `uri` the target URL\n    * `method` the HTTP verb\n    * `username`\n    * `password`\n    * `request` this is optional. An object that holds options that should be passed to the request instance\n* Returns\n  * `Promise` when resolved, the `request` instance, the result and the response body will be passed\n\n---------------------------------------\n\n#### createType1Message([workstation, target])\n\nCreates a type 1 NTLM message to initialize the NTLM handshake\n\n* Arguments\n  * `workstation` Optional. If `undefined`, `''` will be used\n  * `target` Optional. This is the domain/host we are trying to authenticate against.\n* Returns\n  * `string` Complete NTLM string that should be sent to the server in the `Authentication` header\n\n---------------------------------------\n\n#### decodeType2Message(str)\n\nDecodes a type 2 message received from the server including the NTLM challenge\n\n* Arguments\n  * `str` Either the base64 encoded type 2 message, or the complete `WWW-Authenticate` header, or an object containg the response headers (`http.IncomingMessage`)\n* Returns\n  * `type2Message` An object containing the following information about the received type 2 message: `flags`, `encoding`, `version`, `challenge`, `targetName`, `targetInfo`.\n\n---------------------------------------\n\n#### createType3Message(type2Message, username, password[, workstation, target])\n\nCreates a type 3 message based on the type 2 message received from the server.\n\n* Arguments\n  * `type2Message` The decoded type 2 message object\n  * `username`\n  * `password`\n  * `workstation` Optional. If falsy, `''` will be used\n  * `target` Optional. If falsy, the target name from the type 2 message will be used. This is the domain/host we are trying to authenticate against.\n* Returns\n  * `string` Complete NTLM string that should be sent to the server in the `Authentication` header","readmeFilename":"README.md"}