package org.springblade.common.constant;

/**
 * 缓存的key 常量
 *
 * @author bonus
 */
public class CacheConstants
{
    /**
     * 登录用户 redis key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";

    /**
     * 用户与token绑定关系 redis key（限制单端在线）
     * 格式：user_tokens:{username} -> {token-uuid}
     */
    public static final String USER_TOKEN_KEY = "user_tokens:";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 防重提交 redis key
     */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";

    /**
     * 限流 redis key
     */
    public static final String RATE_LIMIT_KEY = "rate_limit:";

    /**
     * 登录账户密码错误次数 redis key
     */
    public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";

    /**
     * 登录IP黑名单 cache key
     */
    public static final String SYS_LOGIN_BLACKIPLIST ="blackIPList";


    /**
     * 系统配置
     * */
    public static final String SYSTEM_CONFIG_VOS ="systemConfigVos";

    /**
     * 请求加密
     * */
    public static final String ENCRYPT_REQUEST ="encryptRequest";

    /**
     * 响应加密
     * */
    public static final String ENCRYPT_RESPONSE ="encryptResponse";

    /**
     * 数据完整性校验
     * */
    public static final String CHECK_INTEGRITY ="checkIntegrity";

    /**
     * 防重放请求
     * */
    public static final String REPLAY_ATTACK ="replayAttack";

    /**
     * auth是否需要解密
     * */
    public static final String AUTH ="auth";

}
