Home > @cerbos/embedded > Options
Options for creating a new Embedded client or Loader.
Signature:
export interface Options extends Pick<CoreOptions, "headers" | "userAgent">
Extends: Pick<CoreOptions, "headers" | "userAgent">
Property |
Modifiers |
Type |
Description |
---|---|---|---|
DecodeJWTPayload | undefined |
(Optional) A function to verify and decode JWTs passed as auxiliary data, returning the JWT payload. | ||
string | undefined |
(Optional) Default policy version to apply to requests that do not specify one. | ||
Record<string, Value> | undefined |
(Optional) Global variables to pass environment-specific information to policy conditions. | ||
boolean | undefined |
(Optional) Enable lenient scope search? By default, when a request specifies a scope of | ||
(() => Date | number) | undefined |
(Optional) A function returning the current time, to be used when evaluating policy conditions. | ||
((entry: DecisionLogEntry) => void | Promise<void>) | undefined |
(Optional) A callback to invoke when a decision is made by the embedded policy decision point. | ||
((error: LoadError) => void | Promise<void>) | undefined |
(Optional) A callback to invoke when the embedded policy decision point bundle has failed to load. | ||
((metadata: BundleMetadata) => void | Promise<void>) | undefined |
(Optional) A callback to invoke when the embedded policy decision point bundle has been loaded. |