java - 关于手机验证码的问题
迷茫
迷茫 2017-04-17 17:38:38
0
3
406

1 . 框架 spring , jpa
2 . 我现在用有一个功能是app注册,我发送一个短信到手机 ,然后注册哪里进行比较验证,
假设发送手机验证码的方法是 getsms() ,比较的方法是 checksms() ,如果同时10个人注册,getsms()方法调用10次,发送10条验证码, 也就是我有10个验证 , 那么checksms()怎么知道那个验证码是谁的 ?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(3)
刘奇

After generating the verification code, save the mobile phone number and verification code at the same time, and then you can judge.

迷茫

When sending, it is based on the mobile phone number. When verifying, you must also verify the current mobile phone number

伊谢尔伦

You can calculate a verification code based on your mobile phone number, so you don’t need to save it in the database.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template