How to use the httpntlm/ntlm.createType1Message function in httpntlm

To help you get started, we’ve selected a few httpntlm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Hanul / YourServerNowHot / BOX / UMAIL / node_modules / nodemailer / node_modules / smtp-connection / lib / smtp-connection.js View on Github external
//this._auth.user+'\u0000'+
                '\u0000' + // skip authorization identity as it causes problems with some servers
                this._auth.user + '\u0000' +
                this._auth.pass, 'utf-8').toString('base64'));
            return;
        case 'CRAM-MD5':
            this._responseActions.push(function (str) {
                this._actionAUTH_CRAM_MD5(str, callback);
            }.bind(this));
            this._sendCommand('AUTH CRAM-MD5');
            return;
        case 'NTLM':
            this._responseActions.push(function (str) {
                this._actionAUTH_NTLM_TYPE1(str, callback);
            }.bind(this));
            this._sendCommand('AUTH ' + ntlm.createType1Message({
                domain: this._auth.domain || '',
                workstation: this._auth.workstation || ''
            }));
            return;
    }

    return callback(this._formatError('Unknown authentication method "' + this._authMethod + '"', 'EAUTH', false, 'API'));
};
github nodemailer / smtp-connection / lib / smtp-connection.js View on Github external
//this._auth.user+'\u0000'+
                    '\u0000' + // skip authorization identity as it causes problems with some servers
                    this._auth.user + '\u0000' +
                    this._auth.pass, 'utf-8').toString('base64'));
                return;
            case 'CRAM-MD5':
                this._responseActions.push(str => {
                    this._actionAUTH_CRAM_MD5(str, callback);
                });
                this._sendCommand('AUTH CRAM-MD5');
                return;
            case 'NTLM':
                this._responseActions.push(str => {
                    this._actionAUTH_NTLM_TYPE1(str, callback);
                });
                this._sendCommand('AUTH ' + ntlm.createType1Message({
                    domain: this._auth.domain || '',
                    workstation: this._auth.workstation || ''
                }));
                return;
        }

        return callback(this._formatError('Unknown authentication method "' + this._authMethod + '"', 'EAUTH', false, 'API'));
    }