Skip to content

client-certificate-auth API Reference


client-certificate-auth API Reference / helpers / allowEmail

Function: allowEmail()

allowEmail(emails): ValidationCallback

Defined in: helpers.js:211

Create a validation callback that allows certificates with matching email addresses. Checks both SAN email entries and subject.emailAddress.

Parameters

emails

string[]

Allowed email addresses

Returns

ValidationCallback

Example

ts
app.use(clientCertificateAuth(allowEmail(['admin@example.com', 'service@example.com'])));

Released under the MIT License.