{"_id":"node-ntlm-client","_rev":"2-e34306f5e8f56767ca458cb71102f95c","name":"node-ntlm-client","description":"A node.js NTLM client with support for NTLM and NTLMv2 authentication","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.2":{"name":"node-ntlm-client","version":"0.1.2","description":"A node.js NTLM client with support for NTLM and NTLMv2 authentication","keywords":["ntlm","ntlmv2","client","authentication"],"main":"./lib/index.js","author":{"name":"Nico Haller","email":"nico.haller@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/gautamsi/node-ntlm-client.git"},"bugs":{"url":"https://github.com/gautamsi/node-ntlm-client.git/issues"},"engines":{"node":">=4.0.0"},"license":"MIT","dependencies":{"extend":"^3.0.0","request":"^2.66.0"},"gitHead":"e553ca93a873d99d6c2a544a97c5af3180702895","homepage":"https://github.com/gautamsi/node-ntlm-client#readme","_id":"node-ntlm-client@0.1.2","scripts":{},"_shasum":"6c05e234b0d9194bb0879929498c6f13962c8472","_from":".","_npmVersion":"4.2.0","_nodeVersion":"4.2.1","_npmUser":{"name":"hans_gruber","email":"emcho.pwn@gmail.com"},"dist":{"shasum":"6c05e234b0d9194bb0879929498c6f13962c8472","tarball":"https://registry.npmjs.org/node-ntlm-client/-/node-ntlm-client-0.1.2.tgz","integrity":"sha512-ZJ/dD0uXoypiQhZg1iCAXkt2a1Y5dxfBvs0VQP4lkzArWIZL8SKU0TZI1SjVbvYyT2Ok0dVkUhl3YOqzjZVYqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyJ8SzmXgeWC7AH688xS/AYbnU11WWofteqKqsbEsRgAIgJjTJoh9co9PB4sihZWPWw12G9zxRXPyoesM64Q+uM/I="}]},"maintainers":[{"name":"hans_gruber","email":"emcho.pwn@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/node-ntlm-client-0.1.2.tgz_1493830293433_0.18114508735015988"}}},"readme":"# ntlm-client\n\nA node.js NTLM client with support for NTLM and NTLMv2 authentication\n\n```\nnpm install ntlm-client\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`, `os.hostname()` 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, `os.hostname()` 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","maintainers":[{"name":"hans_gruber","email":"emcho.pwn@gmail.com"}],"time":{"modified":"2022-06-21T17:30:25.690Z","created":"2017-05-03T16:51:34.484Z","0.1.2":"2017-05-03T16:51:34.484Z"},"homepage":"https://github.com/gautamsi/node-ntlm-client#readme","keywords":["ntlm","ntlmv2","client","authentication"],"repository":{"type":"git","url":"git+https://github.com/gautamsi/node-ntlm-client.git"},"author":{"name":"Nico Haller","email":"nico.haller@gmail.com"},"bugs":{"url":"https://github.com/gautamsi/node-ntlm-client.git/issues"},"license":"MIT","readmeFilename":"README.md"}