Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial:adm:modules_sms [2018/03/09 12:54] michalp [Modules - sms: Configurations] |
tutorial:adm:modules_sms [2023/08/18 13:32] apeterova |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Modules - sms: Configurations ====== | ||
+ | |||
+ | These configuration items are available within the sms module: | ||
+ | |||
+ | < | ||
+ | # Enable property for SMS GET script driver | ||
+ | idm.sec.sms.script.get.enabled | ||
+ | # | ||
+ | # Login that will be used for composes URL with gateway | ||
+ | idm.sec.sms.script.get.login | ||
+ | # | ||
+ | # Password that will be used for composes URL with gatewat | ||
+ | idm.sec.sms.script.get.password | ||
+ | # | ||
+ | # Script that be used for composes URL | ||
+ | idm.sec.sms.script.get.scriptCode | ||
+ | # | ||
+ | # Timeout for comunication with gatewat | ||
+ | idm.sec.sms.script.get.timeout | ||
+ | # | ||
+ | # Phone number that will be used for overriding all recipient number (can be used for testing) | ||
+ | idm.sec.sms.script.get.overrideNumber | ||
+ | |||
+ | </ | ||
+ | |||
+ | It is also necessary to define with sender will be used. These are now available: | ||
+ | |||
+ | * **defaultScriptSmsSender** | ||
+ | * **defaultHtmlSmsSender** | ||
+ | * **defaultSmsBranaSmsSender** | ||
+ | * **defaultEmailSmsSender** | ||
+ | If you want to set up one of these senders, create new configuration property: | ||
+ | |||
+ | <code properties> | ||
+ | # sender implementation | ||
+ | idm.sec.sms.notification-sender.sms.impl=< | ||
+ | |||
+ | </ | ||
+ | |||
+ | More information about this configuration can be found in [[https:// | ||
+ | |||
+ | For defaultEmailSmsSender, | ||
+ | |||
+ | <code properties> | ||
+ | # Suffix for sending SMS by emails. The final recipient' | ||
+ | idm.sec.sms.script.get.sms.email.sender.suffix=@test.cz | ||
+ | |||
+ | </ | ||
+ | |||
+ | ====== Modules - sms: Script for compose URL ====== | ||
+ | |||
+ | For a composition of URL for a given gateway, create a script from the System category. As parameters add these variables: | ||
+ | |||
+ | * **login** | ||
+ | * **password** | ||
+ | * **number** | ||
+ | * **message** | ||
+ | <note important> | ||
+ | |||
+ | ===== Example script ===== | ||
+ | |||
+ | For this script is neccessary add these authorities: | ||
+ | |||
+ | * CLASS: java.net.URLEncoder | ||
+ | * CLASS: java.nio.charset.StandardCharsets | ||
+ | * CLASS: sun.nio.cs.UTF_8 | ||
+ | < | ||
+ | |||
+ | import java.net.URLEncoder; | ||
+ | import java.nio.charset.StandardCharsets; | ||
+ | |||
+ | def messageEncoded = URLEncoder.encode(message, | ||
+ | def numberEncoded = URLEncoder.encode(number, | ||
+ | |||
+ | return " | ||
+ | |||
+ | </ | ||
+ | |||