Concrete implementation of 2018 07 short message Authentication Gateway
This paper will introduce how to use WFilter NGF to implement the SMS authentication gateway and the specific implementation steps of the SMS platform.
1. First of all, we need to build a short message Web service.
WFilter NGF SMS is sent by calling Web API, and there are many SMS platforms that support Web API interface (some SMS cats can also support Web API). In the following, we take Ali Yun's SMS service as an example. First, you need to create an AccessKey, as shown below:
Select or create an SMS template, as shown in the figure:
Download Aliyun's sdk. Take php sdk as an example. After downloading, you need to change all the AccessKey in sdk to the key values created in step 1. As shown in the figure:
Visit smsdemo.php for testing.
Modify php, read the mobile phone number and CAPTCHA in post to send.
two。 Enable SMS Authentication in WFilter
In user Authentication, Web Authentication, enable SMS Authentication in Marketing Authentication, and configure parameters such as Web API's URL address and calling message format.
When clients surf the Internet, SMS authentication is required first, as shown below:
Enter the mobile number to get the CAPTCHA.
Enter the verification code to verify the Internet, in the WFilter "account management", you can query the login mobile phone number, IP address, MAC address and other information.
In the online record, you can query the content of the client's online record, and so on.