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 on 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.