图片验证码服务
图片的显示
注:图片验证码服务通过基础服务域名来调用,如http://base.xx.com/
路径
{domain}/captcha/{uuid}/{scene}
参数说明
参数 | 说明 |
---|---|
scene | 场景标识,规范参见下表 |
uuid | 唯一标识,建议使用uuid |
scene 规范
场景 | 值 |
---|---|
验证码登录 | login |
手机注册 | register |
找回密码 | find_password |
绑定手机 | bind_mobile |
修改密码 | modify_password |
示例:
<img src="http://base.cc.com/captcha/login/xxxxxxxx-xxxx-xxxx-xxxx">
图片码的验证
//注入验证业务接口
@Autowired
ICaptchaService captchaService ;
//调用接口验证
boolean result = captchaService.valid(code,scene,uuid);