
package com.tmerclub.cloud.common.security.config;

import com.tmerclub.cloud.common.constant.Constant;
import com.tmerclub.cloud.common.security.adapter.AuthConfigAdapter;

import java.util.HashSet;
import java.util.Set;

/**
 * @author Citrus
 * @date 2021/8/6 14:32
 */
public class SensitiveWordConfig {

    private static final String SAVE_SENSITIVE_WORD = "/p/sys_config/save/";
    private static final String FEIGN_URL = "/feign/**";
    private static final String ALLINPAY_URL = "/ua/notice/allinpay/member/**";

    static final Set<String> SENSITIVE_WHITE_SET;

    static {
        SENSITIVE_WHITE_SET = new HashSet<>(Constant.INITIAL_CAPACITY);
        SENSITIVE_WHITE_SET.add(AuthConfigAdapter.DOC_URI);
        SENSITIVE_WHITE_SET.add(SAVE_SENSITIVE_WORD);
        SENSITIVE_WHITE_SET.add(FEIGN_URL);
        SENSITIVE_WHITE_SET.add(ALLINPAY_URL);
    }

    private SensitiveWordConfig() {

    }

    public static Set<String> getSensitiveWhiteSet() {
        return SENSITIVE_WHITE_SET;
    }
}
