title: Kerberos authentication in Node.js https.get or https.request
body: <p>I'm trying to write a simple script that requests some data from a tool on an internal network. Here is the code:</p>
  
  <pre><code>#!/usr/bin/node
  
  var https = require('https');
  var fs = require('fs');
  
  var options = {
    host: '&lt;link&gt;',
    port: 443,
    path: '&lt;path&gt;',
    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);
  });
  </code></pre>
  
  <p>Now the question is, how can I use a Kerberos ticket to authenticate rather than supplying my credentials in <code>auth:</code> in plain text?</p>