Hello everyone, I’m looking to set up Client Certificate Authentication with the Apollo Client.
I know how to do this with a basic node request which would look something like this
var fs = require('fs');
var https = require('https');
var options = {
hostname: 'localhost',
port: 4433,
path: '/',
method: 'GET',
key: fs.readFileSync('ssl/client1-key.pem'),
cert: fs.readFileSync('ssl/client1-crt.pem'),
ca: fs.readFileSync('ssl/ca-crt.pem')
};
var req = https.request(options, function(res) {
res.on('data', function(data) {
process.stdout.write(data);
});
});
req.end();
req.on('error', function(e) {
console.error(e);
});
But I was wondering if there were examples somewhere of writing a custom networkInterface
or middleware that would ensure that certificates are passed with every request.
Kind regards,
Kris