Decorator that marks a function for securing an API or an endpoint inside an API.
The decorator takes the API integration ID, and an optional endpoint ID.
If no endpoint ID is provided, the function will secure the whole API.
The function should return a boolean or a Promise of a boolean indicating
whether the action is allowed.
The function takes a context object as a parameter. The context object contains information about the action.
To read more about securing an API, see the
documentation.
Decorator that marks a function for securing an API or an endpoint inside an API. The decorator takes the API integration ID, and an optional endpoint ID. If no endpoint ID is provided, the function will secure the whole API.
The function should return a boolean or a
Promise
of a boolean indicating whether the action is allowed. The function takes a context object as a parameter. The context object contains information about the action.To read more about securing an API, see the documentation.