feat(login): 添加记住我登录功能
前端新增记住我勾选框,登录页挂载时自动恢复已保存的用户名,勾选时将用户名存入本地存储并在登录请求中携带对应参数;后端新增rememberMe参数处理逻辑,配置7天免登录的JWT有效期,重载JWT工具类以支持自定义令牌过期时间
This commit is contained in:
1 parent
f400a93bdd
commit
058e1fb8a7
6 files changed
+56
-4
No files matched your search
@@ -24,4 +24,9 @@ public class LoginDTO implements Serializable {
|
||||
*/
|
||||
@NotBlank(message = "密码不能为空")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 记住我(true 时签发 7 天有效期的 token)
|
||||
*/
|
||||
private Boolean rememberMe = false;
|
||||
}
|
||||
Reference in new issue
Block a user