NOTE: This page contains information on standalone SoapUI Pro that has been replaced with ReadyAPI. To try automated access token retrieval, feel free to download a ReadyAPI trial from our website.
Automated Token Editor
The Automated Token Editor lets you add scripting to automate retrieval of OAuth 2 tokens, by creating javascript interactions with the authentication pages provided by the authentication server.
How it works
For each page involved in the authorization process, you add a corresponding field in the editor.
In each field you put javascript code, that perform the authorization actions required for that page.
The script in a field is run when a page is opened in the browser.
Note: The automation doesn't care what the pages are called, it only grabs them in order. If you need to ensure that you are on the proper page for some reason, it has to be handled inside the scripts.
Automated Token Editor
# |
Icon |
Item |
Description |
|
|
Test Scripts |
Run the automation (to try it out) |
|
|
Add field |
|
|
|
Delete field |
|
|
|
Script area |
Enter script here |
|
|
Field area |
Click here to select field |
|
|
Help link |
Link to more information |
Adding field
- Click on the add script field button.
Delete field
To delete a page:
- Click on the page frame to select it.
- Click on the delete script field button.
Reorder fields
Note: Currently, fields cannot be reordered, only added and deleted. If you need to insert a new page before another, copy and paste the scripts between the pages instead.
Syntax check
When testing the scripts, the editor will warn you if the code you have entered is not formatted correctly:
Browser error
The browser will also display any errors returned by the authorization server.
Validation error
If the script cannot be validated for some reason, you will get an error message.
The error message is only a suggestion, and the error may elsewhere.