使用手机短信验证的用户登录/注册/账号找回流程
主要需求
使用阿里云短信服务来完成短信验证功能
https://dysms.console.aliyun.com/dysms.htm?spm=5176.8195934.1283918..c5ec30c9icCMwQ#/overview/guide
Java开发官方的pom引用
/*
pom.xml
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>4.0.3</version>
</dependency>
*/
接口设计
Thrift 接口设计
//官方注册账号
bool RegisterAccountSend(1:String phone) throws(1: DataException err1),
//短信验证确认
bool RegisterAccountBack(1:String phone,2:String code) throws(1: DataException err1),
//输入密码认
bool RegisterAccountPw(1:String phone,2:String pwd) throws(1: DataException err1),
//手机登陆
UserData LoginAccount(1:String phone,2:String pwd) throws(1: DataException err1),
//找回密码send
bool FindAccountSend(1:String phone) throws(1: DataException err1),
//找回密码back
bool FindAccountBack(1:String phone,2:String code) throws(1: DataException err1),