OTPBySMPPValve

Valve for delivering one-time passwords using SMPP.

Note: Need to deploy module: com.phenixidentity~phenix-smpp-client

Properties

Name Description Default value Mandatory Supports property expansion
smpp_system_id The receiving system id. Yes No
smpp_password The SMPP password. Yes No
smpp_server_ip SMPP server ip address. Yes No
smpp_server_port SMPP server port. Yes No
source_address Where does the message come from. Yes No
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
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
message_key Locale key for the SMPP message. Found in lang/*/strings.xml. valves.otp.smpp.message No No
message Static, non localizeable message. Overrides message_key parameter. No No
dynamic_values Dynamic template mapping values. Separated by pipe (|) Replaces key with value in the message sent to user.
Syntax: $$USERNAME={{item.givenName}}|$$SOME_OTHER_KEY={{item.somevalue}}
See example below.
No Yes

Example Configuration

{
        "name": "OTPBySMPPValve",
        "config": { 
              "smpp_system_id":"smppclient1",
              "smpp_password":"{enc}iLshlMBuAOrybFnFztw02GCgP385ptNkyNjMa7cu7Y0=",
              "smpp_server_ip":"192.168.0.108",
              "smpp_server_port":"2775",
              "source_address":"PhenixID",
              "generated_otp_name":"generated_otp",
              "recipient_param_name":"othermobile",
              "userid_param_name":"{{request.username}}",
              "recipient_prefix":"+46",
              "message_key":"valves.otp.smpp.message",
              "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.

The message sent to user is fetched from the entry: valves.otp.smpp.message located in the lang/en/strings.xml file.

Requirements

Item set must have at least one entry.