OTPBySMTPValve

Valve for delivering one-time passwords by SMTP.

Properties

Name Description Default value Mandatory Supports property expansion
generated_otp_name Item property containing the generated otp. generated_otp No No
mail_param_name Property containing the recipient mail address. mail No Yes
userid_param_name Property containing the username. User-Name No Yes
mail_template The file path to the mail message template. resources/otp_mail_template.mustache No No
smtp_settings SMTP server Settings. Yes No
smtp_host SMTP host address. Overrides SMTP server Settings. No No
smtp_port SMTP port number. Overrides SMTP server Settings. 587 No No
smtp_from_address The from mail address. Overrides SMTP server Settings. No No
smtp_username Username for the smtp account. Overrides SMTP server Settings. No No
smtp_password Password for the smtp account. Overrides SMTP server Settings. No No
start_tls_enabled true No No
ssl_on_connect false No No
ssl_check_server_identity false No No
socket_connection_timeout 15 No No
removal_prefixes Prefixes to be removed as a comma separated list. smtp:,SMTP:,sip: No No
message_subject_key Locale key for the mail message subject. Found in lang/*/strings.xml valves.otp.smtp.message.subject No No
message_body_key Locale key for the mail message body. Found in lang/*/strings.xml valves.otp.smtp.message.body No No
message_subject Static, non localizeable message. Overrides message_subject_key parameter. No No
message_body Static, non localizeable message. Overrides message_body_key parameter. No No

Advanced properties

Additional configuration properties to be used for recipients like [email protected]

Name Description Default value Mandatory Supports property expansion
wash_recipient_number If the mobile number should be washed (i.e. removal of whitespaces, - and other non-number characters). true No No
recipient_prefix Prepends the recipient number with a country prefix if it starts with '0'. (example: +46) No No
remove_leading_plus If the leading + character should be removed from the mobile number. false No No

Example Configuration

{
        "name": "OTPBySMTPValve",
        "config": { 
              "smtp_settings":"7dfddb47-c742-494e-a176-b67bde973f63",
              "start_tls_enabled":"true",
              "userid_param_name":"{{request.username}}",
              "mail_param_name":"{{request.mail}}"
        }
}

Requirements

Item set must have at least one entry.