Loading TOC...

MarkLogic 12 EA 1 Product Documentation
xdmp.getRequestClientCertificate

xdmp.getRequestClientCertificate() as String?

Summary

Returns the PEM encoded client certificate if one was presented.

Returns the empty sequence if it is not called from an HTTP server, if SSL is not enabled for the HTTP server, or if no certificate is available. A clients will not send its certificate unless the server requests it.

Usage Notes

Use this function if you need to examine a client's certificate.

Example

The following example returns an XML representation of a client certificate if one is available.

  for ( const i of xdmp.getRequestClientCertificate() ) {
   xdmp.x509CertificateExtract(i);
  }

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.