Skip to content

TypeScript API / @laikacms/server/oauth2 / UnsafeReasonSpec

Interface: UnsafeReasonSpec ​

Registry entry describing one reason the runtime may be unsafe.

Properties ​

detect ​

ts
readonly detect: (probe, input) => boolean | Promise<boolean>;

Returns true when the unsafe condition holds.

Parameters ​

ParameterType
probeRuntimeProbe
inputGateInput

Returns ​

boolean | Promise<boolean>


ignorable ​

ts
readonly ignorable: boolean;

Whether the operator may suppress this code via ignoreUnsafeReasons.


remedy ​

ts
readonly remedy: string;

What to do instead of overriding.


risk ​

ts
readonly risk: string;

What the adversary gains if this condition is ignored.


title ​

ts
readonly title: string;

One-line human-readable summary.


when ​

ts
readonly when: "construct" | "first-request";

'construct' reasons are checked synchronously by assertRuntimeSafety; 'first-request' reasons require an await and are checked by assertRuntimeSafetyAsync.

Released under the MIT License.