Skip to content

client-certificate-auth API Reference


client-certificate-auth API Reference / helpers / anyOf

Function: anyOf()

anyOf(...callbacks): ValidationCallback

Defined in: helpers.js:273

Combine multiple validation callbacks with OR logic. At least one callback must return true for the certificate to be authorized.

Parameters

callbacks

...ValidationCallback[]

Validation callbacks to combine

Returns

ValidationCallback

Example

ts
app.use(clientCertificateAuth(anyOf(
  allowCN(['admin']),
  allowOU(['Administrators'])
)));

Released under the MIT License.