redactClaims
function redactClaims(claims): Record<string, unknown>;Defined in: src/access-log.ts:119
Replace sensitive claim values with REDACTED.
Matching is on the name a value arrived under, never on its content: a
claim called context holding an email address is not caught, and cannot
be without guessing at free text — a boundary worth stating rather than
pretending to exceed.
Values are replaced rather than dropped so the record still shows which
claims the credential carried. “Did this token carry an email claim?” is
exactly what an audit log exists to answer; “what was it?” is not.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
claims |
Record<string, unknown> |
Returns
Section titled “Returns”Record<string, unknown>
