Skip to content

client-certificate-auth API Reference


client-certificate-auth API Reference / helpers / allowCN

Function: allowCN()

allowCN(names): ValidationCallback

Defined in: helpers.js:32

Create a validation callback that allows certificates with matching Common Names.

Parameters

names

string[]

Allowed Common Names

Returns

ValidationCallback

Example

ts
app.use(clientCertificateAuth(allowCN(['service-a', 'service-b'])));

Released under the MIT License.