From d20aa616e8eb944d7f20477ffa00a51aa313dc09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=B2=90?= Date: Wed, 9 Aug 2023 23:25:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=99=BB=E5=BD=95=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../security/properties/SecurityProperties.java | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 maku-framework/src/main/java/net/maku/framework/security/properties/SecurityProperties.java diff --git a/maku-framework/src/main/java/net/maku/framework/security/properties/SecurityProperties.java b/maku-framework/src/main/java/net/maku/framework/security/properties/SecurityProperties.java new file mode 100644 index 0000000..143c489 --- /dev/null +++ b/maku-framework/src/main/java/net/maku/framework/security/properties/SecurityProperties.java @@ -0,0 +1,25 @@ +package net.maku.framework.security.properties; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * 安全配置项 + * + * @author 阿沐 babamu@126.com + * MAKU + */ +@Data +@Configuration +@ConfigurationProperties(prefix = "maku.security") +public class SecurityProperties { + /** + * accessToken 过期时间(单位:秒),默认2小时 + */ + private int accessTokenExpire = 60 * 60 * 2; + /** + * refreshToken 过期时间(单位:秒),默认14天 + */ + private int refreshTokenExpire = 60 * 60 * 24 * 14; +}