OTPBySMTPValve
Valve for delivering one-time passwords by SMTP.
Properties
Advanced properties
Additional configuration properties to be used for recipients like [email protected]
Example Configuration
A connection to SMTP can be made using scenario's in PhenixID configuration portal.
So some of the parameters will be contained within that global smtp configuration.
If a connection has been created already, the id for smtp_settings will be used and configuration will look similar to the first example.
More information about the Scenario for SMTP can be found here.
The valve can also be added with all the parameters, through the Advanced tab in PhenixID configuration portal.
Configuration will then look similar to the second example.
{
"name": "OTPBySMTPValve",
"enabled": "true",
"config": {
"smtp_settings": "fff21007-4fbe-450d-8aa2-3756a44745fa",
"start_tls_enabled": "true",
"userid_param_name": "User-Name",
"mail_param_name": "mail",
"generated_otp_name": "generated_otp",
"mail_template": "resources/otp_mail_template.mustache",
"socket_connection_timeout": "15",
"removal_prefixes": "smtp:,SMTP:,sip:"
}
}
{
"name": "OTPBySMTPValve",
"config": {
"start_tls_enabled":"true",
"socket_connection_timeout" : "30",
"removal_prefixes" : "smtp:,SMTP:",
"generated_otp_name" : "generated_otp",
"userid_param_name":"{{request.username}}",
"mail_param_name":"{{request.mail}}",
"mail_template" : "resources/otp_mail_template.mustache",
"smtp_host" : "smtp.company.org",
"smtp_port" : "587",
"smtp_username" : "[email protected]",
"smtp_password" : "{enc}Lsd28p9AMU1oAjwHgHprVdWmGteLZ6XYxY/AxkBusXg=",
"smtp_from_address" : "[email protected]",
"message_subject": "Your subject text",
"message_body": "Your body text: $$OTP",
"wash_mobile_number" : "true",
"recipient_prefix" : "+46"
}
}
In the example above the value for attribute mail 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.
Requirements
Item set must have at least one entry.