package com.gci.boot.properties;

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

@ConfigurationProperties(prefix = "gci.security")
@Data
public class GciSecurityProperties {

    private boolean enablePhoneEncrypt = false;
    private Shiro shiro = new Shiro();
    private Jwt jwt = new Jwt();

    @Data
    public class Shiro {

        /**
         * 不做权限控制的url
         */
        private String excludeUrls;

        /**
         * 登录缓存时间 毫秒ms, 默认30min
         */
        private long expireTime = 30 * 60 * 1000;
    }

    @Data
    public class Jwt{
        //是否使用非对称加密，默认否
        private boolean asymmetric = false;
        //对称加密密钥
        private String secret;
        //公钥
        private String publicKey;
        //私钥
        private String privateKey;
    }
}
