Skip to content

client-certificate-auth API Reference


client-certificate-auth API Reference / parsers / parseUrlPemAws

Function: parseUrlPemAws()

parseUrlPemAws(headerValue): PeerCertificate | null

Defined in: parsers.js:191

Parse URL-encoded PEM certificate with AWS ALB safe character handling. AWS ALB uses +, =, / as safe characters (not encoded), but decodeURIComponent interprets + as space, so we must escape it first. AWS sends the full chain as concatenated PEM blocks, which we split and link via issuerCertificate.

Parameters

headerValue

string

AWS ALB URL-encoded PEM certificate

Returns

PeerCertificate | null

Parsed certificate or null on failure

See

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/mutual-authentication.html

Released under the MIT License.