Testing statement processing
When testing PingOne Authorize policies, you can enable statement processing to test API request and response transformations without using an external testing service.
Before you begin
Make sure you have defined an API service, as well as a custom policy with transformational statements protecting that service.
About this task
PingOne Authorize only processes built-in statements defined in custom policies and rules for API services. For more information, see Statement templates. |
Steps
-
Go to Authorization > Policies.
-
Select the policy that you want to test, and then click the Test tab.
-
Define test parameters.
-
Select the Process Statements check box, and select REQUEST or RESPONSE depending on which stage of the API request flow you want to test.
-
In the API Request form, configure the testing scenario.
Example:
For example, consider the Users starting a new game policy from the tutorials. You can add a
set-attributes
statement to update theID
attribute in an API request.Then, use the following testing scenario to test the statement.
Click the angle brackets next to the Body field to display a rich JSON text editor.
-
Click Execute.
Result:
The Visualization tab shows test results. The Processing Result tab displays the transformed API request or response body with statements applied, along with any specified URI and headers. This tab is only displayed if you enabled statement processing.
This tab also displays full and partial statement processing failures, including the code of the failed statement and a description of the failure.