The Peoplevox re-authentication response script
This script and associated functionality are coming soon - please check our release notes for upcoming releases.
Introduction
Typically, SOAP authentication via tokens works by authenticating once and sending a valid token in response - this token is included in all subsequent requests until it expires. When the token expires, a 401
(authentication failed) response is returned, and we will re-authenticate with the next request.
However, Peoplevox doesn't send a 401
response when a token expires - a 200
(success) code is returned and the authentication outcome is included in the response body. So for optimal performance (i.e. to avoid having to authenticate every request), we need a way to trigger re-authentication based on content in the response body. To achieve this, we use a response script.
Using this script is recommended but not mandatory. Without this script, Peoplevox process flows will run normally, though not optimally (since every request is authenticated).
About the re-authentication response script
Response scripts are applied to process flow connector shapes to control whether the connector shape/process flow fails or continues, based on information returned from the connection request.
The script runs every time a connection is attempted and receives the response code, headers, and body from the request. Utilising response_code
actions, the script returns a value determining whether the connector shape/flow run continues or stops.
For more information, please see Using connector shape response scripts.
The script below has been developed for Peoplevox.
This checks the <AuthenticateResponse><AuthenticateResult>
section of the SOAP response body to determine success or failure. If authentication is found to have failed, the connector step will retry the request and re-authenticate.
Implementing the response script
If you are receiving or sending data from/to Peoplevox in process flows, we recommend following the steps below to implement the Peoplevox Re-Authentication Response Script.
Step 1 Install the Peoplevox Re-Authentication Response Script from the Patchworks marketplace.
Step 2 Having installed the script, you should apply it to any connector steps in your process flows(s) where Peoplevox is used. This is just a case of accessing connector shape settings and selecting the response script that you installed - for example:
Step 3 Raise a ticket with Patchworks support for the Enhanced Peoplevox Re-Authentication feature to be switched on for your organisation.
For general information about response scripts, please see: Using connector shape response scripts.
What if I don't use this script?
Without this script, Peoplevox process flows will run normally, though not optimally (since every request is authenticated).
Last updated