Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/security / / withSecret
Function: withSecret()
ts
function withSecret<T>(
value,
fn,
opts?): Promise<T>;Defined in: packages/security/src/secrets/acl.ts:180
Run fn with the unwrapped value. Auto-wraps raw strings into a SecretValue so callers migrating from raw-string APIs do not have to wrap manually. Records a single audit event per scope.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
value | | string | SecretValue |
fn | (raw) => T | Promise<T> |
opts | { caller?: string; } |
opts.caller? | string |
Returns
Promise<T>