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 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 message
        to - The address that the SMS message is sent
        subject - The SMS subject
        message - The content contained in the SMS message
        code - The code in the SMS message
        options - 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 message
        to - The address that the E-mail message is sent
        subject - The E-mail subject
        message - The content contained in the E-mail message
        code - The code in the E-mail message
        options - The SMS gateway options defined in the HOTP authentication module
        Throws:
        AuthLoginException - In case the module was unable to send the e-mail