Skip to main content

assertToolkitAuth

@retinue/monorepo


@retinue/monorepo / backend/src / assertToolkitAuth

Function: assertToolkitAuth()

assertToolkitAuth(ref, auth, declared): void

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

Refuses a toolkit configuration whose credential cannot be presented — at construction.

Takes the declared scheme rather than resolving, because resolution needs a context and construction has none. A host that wires a static map can therefore be told immediately; a host whose resolver is dynamic is caught by withCredentialAudit at the first call instead. Both are before the vendor sees anything.

Parameters​

ref​

string

auth​

ToolkitAuth

declared​

"bearer" | "basic" | "custom-header" | undefined

Returns​

void