Class WhateverMobileSMSTokenProvider

All Implemented Interfaces:
TokenProvider

public class WhateverMobileSMSTokenProvider extends SMSTokenProvider
Description

The whateverMobileSMSTokenProvider randomly generates a 6-digit token after the user entered her correct password.

The token is then sent to the user via text message. The user's attribute sms is used as the recipient phone number. If this attribute has not been provided by the user data provider, the login attempt fails.

The text message is sent via WhateverMobile REST API. To use this API, a registered user account with sufficient balance is necessary. Membrane uses the specified user name and password to identify itself when connecting to the WhateverMobile SMS Gateway.

Explanation
A token provider using WhateverMobile's REST interface to send a randomly generated numeric token to the user's phone via text message.
  • Constructor Details

    • WhateverMobileSMSTokenProvider

      public WhateverMobileSMSTokenProvider()
  • Method Details

    • init

      public void init(Router router)
    • normalizeNumber

      protected String normalizeNumber(String number)
      Specified by:
      normalizeNumber in class SMSTokenProvider
    • sendSMS

      protected void sendSMS(String text, String recipientNumber)
      Specified by:
      sendSMS in class SMSTokenProvider
    • getGatewayUserName

      public String getGatewayUserName()
    • setGatewayUserName

      public void setGatewayUserName(String user)
      Description
      Your whatevermobile.com gateway user name.
    • getGatewayPassword

      public String getGatewayPassword()
    • setGatewayPassword

      public void setGatewayPassword(String pw)
      Description
      Your whatevermobile.com gateway password.
    • getSenderName

      public String getSenderName()
    • setSenderName

      public void setSenderName(String senderName)
      Default
      Membrane
      Description
      The sender name of the text messages. This string is displayed as the sender on the recipient's phone.
      Example
      Your Organization Name
    • isBackupServiceAvailable

      public boolean isBackupServiceAvailable()
    • setBackupServiceAvailable

      public void setBackupServiceAvailable(boolean backup)
      Description
      Specify whether the alternative gateway is available for the configured account