Worklight JavaScript PIP
An appliance with Advanced Access Control can provide a JavaScript policy information point (PIP) for the Worklight product.
The Worklight JavaScript PIP is a prepopulated PIP that completes the following tasks:
- Decodes and parses the POST data that exists in a Worklight adapter request.
- Returns custom attributes that are created from the data that is contained within the POST data from the parameters element.
To support context-based authorization for Worklight adapters, you must create a custom PIP to URL-decode and tokenize form POST data.
Worklight uses the following HTTP POST format: x-www-form-urlencoded
For example: adapter=BankingApprovals&procedure=doTransfer¶meters=%5B%22200%22%2C%22sav%22%2C%22chq%22%5D represents the following JSON data: ["200","sav","chq"]
- The JavaScript PIP maps the POST data into the following corresponding Worklight attribute names: worklight.adapter.adapter, worklight.adapter.procedure, and worklight.adapter.parameters.
- The Worklight client calls the Worklight Adapter, which starts a procedure where the parameters are passed. In the example, the name of the Worklight adapter is BankingApprovals.
- The Worklight PIP then determines the attribute context of the worklight.adapter.parameters. This context is based on the worklight.adapter.adapter attribute and the worklight.adapter.procedure attribute.
- The JavaScript PIP
maps the following values into their corresponding Worklight attributes:
- parameters
- worklight.adapter.parameters is the Worklight attribute for parameters.
- 200
- worklight.adapter.transfer.amount is the Worklight attribute for 200.
- sav
- worklight.adapter.transfer.account.from is the Worklight attribute for sav.
- chq
- worklight.adapter.transfer.account.to is the Worklight attribute for chq.
You can complete the following tasks for these PIPs by using the local management interface:
- Add, modify, and delete PIPs.
- View, import, and export JavaScript PIPs.
The sample Worklight JavaScript PIP and associated attributes on the appliance provide built-in support for the IBM® Security Verify Access for Worklight integration sample application. See IBM Security Verify Access for IBM Worklight for more information
See Managing policy information points and JavaScript properties.