Class WhateverMobileSMSTokenProvider
- All Implemented Interfaces:
TokenProvider
- 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.
-
Field Summary
Fields inherited from class com.predic8.membrane.core.interceptor.authentication.session.SMSTokenProvider
prefixText -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanprotected StringnormalizeNumber(String number) protected voidvoidsetBackupServiceAvailable(boolean backup) voidvoidsetGatewayUserName(String user) voidsetSenderName(String senderName) Methods inherited from class com.predic8.membrane.core.interceptor.authentication.session.SMSTokenProvider
getPrefixText, isSimulate, requestToken, setPrefixText, setSimulateMethods inherited from class com.predic8.membrane.core.interceptor.authentication.session.NumericTokenProvider
generateToken, verifyToken
-
Constructor Details
-
WhateverMobileSMSTokenProvider
public WhateverMobileSMSTokenProvider()
-
-
Method Details
-
init
-
normalizeNumber
- Specified by:
normalizeNumberin classSMSTokenProvider
-
sendSMS
- Specified by:
sendSMSin classSMSTokenProvider
-
getGatewayUserName
-
setGatewayUserName
- Description
- Your whatevermobile.com gateway user name.
-
getGatewayPassword
-
setGatewayPassword
- Description
- Your whatevermobile.com gateway password.
-
getSenderName
-
setSenderName
- 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
-