如何在Node / Express中使用CAC对用户进行身份验证

时间:2019-09-19 18:34:50

标签: node.js reactjs express cac

我需要允许用户使用其国防部签发的通用访问卡登录我的React网站。我正在使用Express API作为身份验证服务器。我已将服务器配置为需要客户端证书:

const options = {
      key: fs.readFileSync(config.ssl.keyPath),
      cert: fs.readFileSync(config.ssl.certPath),
      ca: [fs.readFileSync(config.ssl.caPath)],
      requestCert: true,
      rejectUnauthorized: false,
    };

    https.createServer(options, expressApp).listen(port);

如何获取我的React应用以从CAC请求/加载/读取证书?

0 个答案:

没有答案