Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
//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'));
};
//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'));
}