package com.codvision.webcore.config.encrypt;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author hxl
 */
@Data
@Component
@ConfigurationProperties(ApiSecretProperties.PREFIX)
public class ApiSecretProperties {

    /**
     * 前缀
     */
    public static final String PREFIX = "security.api.encrypt";

    /**
     * 固定参数名称
     */
    public static final String PARAM_NAME = "encryption";

    /**
     * 是否启用标志，默认false
     */
    private boolean enabled = false;

    /**
     * 是否全局加解密，默认false
     */
    private boolean globalEnabled = false;

    /**
     * 秘钥
     */
    private String secretKey;
}
