package com.kxs.gateway.api.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;

import java.util.List;

/**
 * @author LXQ
 * @date 2021/10/4
 * <p>
 * 网关配置文件
 */
@Data
@RefreshScope
@ConfigurationProperties("gateway")
public class GatewayConfigProperties {

	/**
	 * 网关解密 秘钥 {@link com.kxs.gateway.api.filter.RequestDecoderFilter}
	 */
	@Value("${gateway.aes.encode-key}")
	private String encodeKey;

	@Value("${gateway.aes.encode-iv}")
	private String encodeIv;

	@Value("${gateway.aes.encode-mode}")
	private String encodeMode;

	@Value("${gateway.aes.encode-padding}")
	private String encodePadding;

	/**
	 * 网关不需要校验验证码的客户端 {@link com.kxs.gateway.api.filter.ValidateCodeGatewayFilter}
	 */
	private List<String> ignoreClients;

}
