Joke Collection Website - Blessing messages - How to verify the picture verification code with SMS verification code

How to verify the picture verification code with SMS verification code

When you click the register button, the front end generates a UUID random value as a GET request parameter;

The backend accepts parameters through the interface to judge whether it is empty, and if there is content, proceed to the next step.

Calling a tool class to generate a verification code picture and content,

Save the captcha content locally with redis, use the uuid passed in from the front end as the key, and set the content type to "image/jpg".

Enter the picture verification code in the front end, click Send SMS, and send a request to the back end. The parameters include mobile phone number, verification code content, picture ID, etc.

The backend verifies the mobile phone number, UUID and verification code, and the response is successful.