Skip to content

client-certificate-auth API Reference


client-certificate-auth API Reference / helpers / allowSubject

Function: allowSubject()

allowSubject(match): ValidationCallback

Defined in: helpers.js:108

Create a validation callback that allows certificates with matching subject fields. All specified fields must match (partial matching).

Parameters

match

Subject fields to match

C?

string

CN?

string

L?

string

O?

string

OU?

string

ST?

string

Returns

ValidationCallback

Example

ts
app.use(clientCertificateAuth(allowSubject({ O: 'My Company' })));

Released under the MIT License.