Skip to main content

withCredentialAudit

@retinue/monorepo


@retinue/monorepo / backend/src / withCredentialAudit

Function: withCredentialAudit()

withCredentialAudit(resolver, audit, expected?): CredentialResolver

Defined in: backend/src/tools/credentials.ts:220

Wraps a resolver so every resolution is audited, and so a scheme mismatch is caught here rather than by the vendor — #260 AC-2 and AC-8.

A wrapper rather than a change to every resolver: a host's own resolver stays a four-line object, and the cross-cutting obligations are added once, where they cannot be forgotten per toolkit.

Parameters​

resolver​

CredentialResolver

audit​

CredentialAudit

expected?​

readonly ("bearer" | "basic" | "custom-header")[]

Returns​

CredentialResolver