couchbase-analytics
    Preparing search index...

    Class CertificateCredential

    A client certificate (mTLS) for authenticating to an Analytics cluster. The certificate is presented during the TLS handshake; no Authorization header is sent. Requires an https:// endpoint.

    To load from disk, read the file(s) yourself and pass the bytes.

    // PKCS#12 keystore
    import * as fs from 'node:fs'
    new CertificateCredential({
    pfx: fs.readFileSync('/path/to/client.p12'),
    passphrase: 'keystore-pass',
    })

    // PEM certificate + private key
    new CertificateCredential({
    cert: fs.readFileSync('/path/to/client.pem'),
    key: fs.readFileSync('/path/to/client.key'),
    })
    Index

    Constructors

    Constructors