Interface SMSGateway
-
@SupportedAll public interface SMSGateway
Defines the ability to send SMS (Short Message Service) and e-mail via a gateway implementation. The implementation is responsible for resolving its own configuration details. Each message provided will contain information about where it is to be sent to. The messages are expected to be delivered within the limits of the current authentication session and/or module state's timeout timeframe. The implementation is expected to operate in either a synchronous or asynchronous fashion, with no requirements on when the message should be delivered to the recipient.
Thread Safety: The implementation does not have to be implemented in a thread-safe manner, each OTP code will be sent using a new instance of the gateway implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
sendEmail(String from, String to, String subject, String message, String code, Map options)
Sends an email message to the mail with the codevoid
sendSMSMessage(String from, String to, String subject, String message, String code, Map options)
Sends a SMS message to the phone with the code
-
-
-
Method Detail
-
sendSMSMessage
void sendSMSMessage(String from, String to, String subject, String message, String code, Map options) throws AuthLoginException
Sends a SMS message to the phone with the code- Parameters:
from
- The address that sends the SMS messageto
- The address that the SMS message is sentsubject
- The SMS subjectmessage
- The content contained in the SMS messagecode
- The code in the SMS messageoptions
- The SMS gateway options defined in the HOTP authentication module- Throws:
AuthLoginException
- In case the module was unable to send the SMS
-
sendEmail
void sendEmail(String from, String to, String subject, String message, String code, Map options) throws AuthLoginException
Sends an email message to the mail with the code- Parameters:
from
- The address that sends the E-mail messageto
- The address that the E-mail message is sentsubject
- The E-mail subjectmessage
- The content contained in the E-mail messagecode
- The code in the E-mail messageoptions
- The SMS gateway options defined in the HOTP authentication module- Throws:
AuthLoginException
- In case the module was unable to send the e-mail
-
-