I'm trying to write a simple script that requests some data from a tool on an internal network. Here is the code:
#!/usr/bin/node
var https = require('https');
var fs = require('fs');
var options = {
host: '<link>',
port: 443,
path: '<path>',
auth: 'username:password',
ca: [fs.readFileSync('../.cert/newca.crt')]
};
https.get(options, function(res) {
console.log("Got response: " + res.statusCode);
res.on('data', function (d) {
console.log('BODY: ' + d);
});
}).on('error', function(e) {
console.log("Got error: " + e.message);
});
Now the question is, how can I use a Kerberos ticket to authenticate rather than supplying my credentials in auth:
in plain text?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…