xiangpei
2025-05-19 ad2fc69d87a8ba4d2f4b248e571b7207bdd9261e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package cn.lili.modules.verification;
 
import cn.lili.cache.Cache;
import cn.lili.cache.CachePrefix;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
/**
 * 验证码sdk
 *
 * @author Chopper
 * @version v4.0
 * @since 2020/11/17 15:43
 */
@Component
public class VerificationSDK {
 
    @Autowired
    private Cache cache;
 
    /**
     * 生成一个token 用于获取校验中心的验证码逻辑
     *
     * @return
     */
    public boolean checked(String verificationKey, String uuid) {
        //生成校验KEY,在验证码服务做记录
        String key = CachePrefix.VERIFICATION_KEY.getPrefix() + verificationKey;
        cache.get(key);
        return true;
    }
 
 
}