If you find any errors, typos or have general feedback, select the text and click CTRL+ALT+ENTER.


A Generic Security Context service is used to wrap REST service calls. The user is able to run any JS code before or after REST service execution.

Creating the service

To create a Generic Security Context service, go to the Create new > Service > Generic Security Context radio and click “Create Service”:


The following page is loaded:


You can enter a name parameter (name is a binary string that labels a security principal [i.e., user or service program]) and an (optional) Default value (a string that is used, for example, for tests or as static values).

You can add custom implementation by clicking “Add custom implementation.” Enter the name for JS file, or select an existing JS file, and confirm:


Open the JavaScript file. You should see something like:


Where Token is the name of JavaScript:

This is needed before executing for checking/editing/adding parameters.

An example of the JavaScript for the custom implementation:


For the services that need additional options, on the Settings tab for the Security Context menu item, you should choose your Generic Security Context:


You can create as many Generic Security Context services as you need. They may be used for authorization, validation, service debugging, etc.