OTPByHTTPPostValve
Note
Valve for delivering one-time passwords by HTTP POST.
Supports template file body.
Properties
Name | Description | Default value | Mandatory | Supports property expansion |
---|---|---|---|---|
generated_otp_name | Item property containing the generated otp. | generated_otp | No | No |
recipient_param_name | Property containing the recipient mobile number. | mobile | No | Yes |
userid_param_name | Property containing the username. | User-Name | No | Yes |
url_list | Comma separated list of URLs to send to. Failover functionality. | Yes | No | |
success_string | String to look for if the POST was successful. | 'OK' | No | No |
content_type | Content-Type of the HTTP POST. | application/x-www-form-urlencoded | No | No |
template_file_path | The file path to the POST-template to use. | No | No | |
auth_username | Username for auth. | No | No | |
auth_password | Password for auth. | No | No | |
headers | HTTP headers for the POST. Separated by pipe '|' | No | No | |
wash_recipient_number | If the mobile number should be washed (i.e. removal of whitespaces, - and other non-number characters). | true | No | No |
remove_leading_plus | If the leading + character should be removed from the mobile number. | false | No | No |
recipient_prefix | If the mobile number should be prepended with a country prefix. (example: +46) | No | No | |
dynamic_values | Dynamic template mapping values. Separated by pipe (|) Replaces key with value in the template file. Syntax: $$USERNAME={{item.givenName}}|$$SOME_OTHER_KEY={{item.somevalue}} See example below. |
No | Yes |
Example Configuration
{
"name": "OTPByHTTPPostValve",
"config": {
"generated_otp_name" : "generated_otp",
"recipient_param_name" : "{{item.othermobile}}",
"userid_param_name" : "{{request.User-Name}}",
"url_list" : "https://www.messageservice.dd,https://www.messageservice.ff",
"template_file_path":"C:\\Windows\\Temp\\template.xml",
"success_string":"message_ok",
"headers":"Cache-Control:no-cache|Connection:keep-alive",
"content_type" : "application/x-www-form-urlencoded",
"auth_username" : "myaccountid",
"auth_password" : "myaccuntpassword",
"wash_recipient_number" : "true",
"recipient_prefix" : "+46",
"dynamic_values" : "$$USERNAME={{item.givenName}}"
}
}
In the example above the value for attribute othermobile has been picked up earlier in the flow.
The value for userid_param_name has been picked up from the request. Most common values are {{request.User-Name}} for RADIUS and {{request.username}} for HTTP.
Information about values for url_list and success_string should be retrieved from the supplier of the message service.
As well as the syntax for the template file.
Requirements
Item set must have at least one entry.