001package run.iget.framework.captcha.service; 002 003import run.iget.framework.captcha.req.CaptchaReq; 004import run.iget.framework.captcha.resp.CaptchaResp; 005 006public interface CaptchaService { 007 008 final String SIGN_KEY = "IGET-FOOT-BOOT"; 009 final Long TIME_OUT = 3 * 60 * 1000L; 010 011 /** 012 * 生成验证码信息 013 * @return 014 */ 015 CaptchaResp generate(); 016 017 /** 018 * 对验证码进行校验,校验不通过则抛出异常 019 * @param captchaReq 020 */ 021 void verify(CaptchaReq captchaReq); 022}