PropertySplitByIndexValve
Splits a value (source) in two, using index (position). New values are put in two separate attributes (destination_attribute_one & destination_attribute_two).
This valve was intended to be used in an authentication scenario where the user enters both password and otp in the same field.
Properties
Example Configuration
{
"name": "PropertySplitByIndexValve",
"config": {
"source":"{{request.User-Password}}",
"destination_attribute_one":"password",
"destination_attribute_two":"otp",
"position":"-6"
}
}
More about position
The value set for position indicates both the length of the OTP and if the OTP is entered before or after the password.
The postion value -6 means an OTP with the length of 6 is placed after the password. (i.e. supersecret123456)
To set the OTP before the password the position value should be 6. (i.e. 123456secretsuper)
Requirements
Item set must have exactly one entry.
Older versions