MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / getCertificateViaTLS

Function getCertificateViaTLS

lib/api/authn/webid-tls.mjs:39–46  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

37
38// Tries to obtain a client certificate retrieved through the TLS handshake
39function getCertificateViaTLS (req) {
40 const certificate = req.connection.getPeerCertificate &&
41 req.connection.getPeerCertificate()
42 if (certificate && Object.keys(certificate).length > 0) {
43 return certificate
44 }
45 debugAuth('No peer certificate received during TLS handshake.')
46}
47
48export function setEmptySession (req) {
49 req.session.userId = ''

Callers 1

handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected