Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
ntlm-ad-client
Advanced tools
Readme
A simple NTLM Client to negotiate and authenticate against an Active Directory.
ntlm-ad-client
is heavily inspired by PyAuthenNTLM2. Also a thanks to Alessandro Mancini for separating and refactoring the main part of this module from its originating repository express-ntlm
$ npm install ntlm-ad-client
const ntlm_client = require('ntlm-ad-client')
const MESSAGE_NTLM_1 = 'MESSAGE_NTLM_1';
const MESSAGE_NTLM_3 = 'MESSAGE_NTLM_3'
const HOSTNAME = 'YOUR_HOSTNAME'
const PORT = 'YOUR_PORT'
const DOMAIN = 'YOUR_DOMAIN'
const client = ntlm_client({
hostname: HOSTNAME,
port: PORT,
domain: DOMAIN,
path: null,
use_tls: false,
tls_options: undefined
})
client.negotiate(MESSAGE_NTLM_1, (err, challenge) => {
if (err) throw new Error(err);
console.log(challenge);
client.authenticate(MESSAGE_NTLM_3, (err, result) => {
if (err) throw new Error(err);
console.log(result); // // {"DomainName":"MYDOMAIN","UserName":"MYUSER","Workstation":"MYWORKSTATION"}
})
})
Name | type | description |
---|---|---|
hostname | string | Hostname of the Active Directory. |
port | string | Port of the Active Directory. |
domain | string | Default domain if the DomainName-field cannot be parsed. |
path | string | Base DN. not implemented yet |
use_tls | boolean | Indicates wether to use TLS or not. |
tls_options | object | An options object that will be passed to tls.connect and tls.createSecureContext. Only required when using ldaps and the server's certificate is signed by a certificate authority not in Node's default list of CAs. (or use NODE_EXTRA_CA_CERTS environment variable) |
tls_options.ca | string / array / Buffer | Override the trusted CA certificates provided by Node. Refer to tls.createSecureContext |
FAQs
A simple NTLM client for Active Directories
The npm package ntlm-ad-client receives a total of 0 weekly downloads. As such, ntlm-ad-client popularity was classified as not popular.
We found that ntlm-ad-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.