Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
张文彪
/
employmentBusinessPc
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4cbee66c
authored
Nov 27, 2025
by
zwb
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改登录验证码去除与登录过期时间
parent
aea9d611
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
employmentBusiness-pc-auth/src/main/java/com/bkty/service/impl/PasswordAuthStrategy.java
employmentBusiness-pc-auth/src/main/java/com/bkty/service/impl/PasswordAuthStrategy.java
View file @
4cbee66c
...
...
@@ -53,15 +53,17 @@ public class PasswordAuthStrategy implements IAuthStrategy {
String
uuid
=
loginBody
.
getUuid
();
// 验证码开关
if
(
captchaProperties
.
getEnabled
())
{
validateCaptcha
(
username
,
code
,
uuid
);
}
//
if (captchaProperties.getEnabled()) {
//
validateCaptcha(username, code, uuid);
//
}
LoginUser
loginUser
=
remoteUserService
.
getUserInfo
(
username
);
loginService
.
checkLogin
(
LoginType
.
PASSWORD
,
username
,
()
->
!
BCrypt
.
checkpw
(
password
,
loginUser
.
getPassword
()));
SaLoginModel
model
=
new
SaLoginModel
();
model
.
setTimeout
(
604800
);
// 7天有效
model
.
setActiveTimeout
(
1800
);
// 半小时不活动自动下线
// model.setTimeout(604800); // 7天有效
// model.setActiveTimeout(1800);// 半小时不活动自动下线
model
.
setTimeout
(
3600L
*
24
*
365
*
1
);
// 1年有效
model
.
setActiveTimeout
(
3600L
*
24
*
365
*
1
);
// 1年不活动自动下线
// 生成token
LoginHelper
.
login
(
loginUser
,
model
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment