Interface TwingSandboxSecurityPolicy
interface TwingSandboxSecurityPolicy { checkMethodAllowed(candidate: any,
method: string): void; checkPropertyAllowed(candidate: any,
property: string): void; checkSecurity(tags: string[],
filters: string[],
functions: string[]): null | { message: string; token: string; type: "function" | "filter" | "tag"; }; } Methods
checkMethodAllowed
- checkMethodAllowed(candidate, method): void
Parameters
- candidate: any
- method: string
Returns void
checkPropertyAllowed
- checkPropertyAllowed(candidate, property): void
Parameters
- candidate: any
- property: string
Returns void
checkSecurity
- checkSecurity(tags, filters, functions): null | {
message: string;
token: string;
type: "function" | "filter" | "tag";
} Parameters
- tags: string[]
- filters: string[]
- functions: string[]
Returns null | {
message: string;
token: string;
type: "function" | "filter" | "tag";
}
Throws
When the method is not allowed on the passed object