Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王衍超
cloud-fb
Commits
a8e71ad4
Commit
a8e71ad4
authored
3 years ago
by
PWF-WK01\pengwufeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
砂厂用户登录调整
parent
cf71e17c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
RESTWarehouseUserAuthenticationSuccessHandler.java
...andler/RESTWarehouseUserAuthenticationSuccessHandler.java
+10
-8
No files found.
backend/inz.authentication/src/main/java/com/beecode/inz/authentication/handler/RESTWarehouseUserAuthenticationSuccessHandler.java
View file @
a8e71ad4
...
...
@@ -6,6 +6,7 @@ import java.util.Date;
import
javax.servlet.ServletException
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpSession
;
import
org.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -49,15 +50,16 @@ public class RESTWarehouseUserAuthenticationSuccessHandler extends SimpleUrlAuth
if
(
warehouseUser
!=
null
)
{
JSONObject
returnJson
=
new
JSONObject
();
request
.
getSession
().
setAttribute
(
AuthcConstants
.
SESSION_TENANTID
,
tenant
);
request
.
getSession
()
.
setAttribute
(
AuthcConstants
.
USERID
,
warehouseUser
.
getId
());
request
.
getSession
()
.
setAttribute
(
AuthcConstants
.
USERNAME
,
warehouseUser
.
getUsername
());
request
.
getSession
()
.
setAttribute
(
AuthcConstants
.
TELEPHONE
,
warehouseUser
.
getTelephone
());
request
.
getSession
()
.
setAttribute
(
AuthcConstants
.
TITLE
,
warehouseUser
.
getTitle
());
request
.
getSession
()
.
setAttribute
(
"mobile"
,
true
);
request
.
getSession
()
.
setMaxInactiveInterval
(
30
*
24
*
60
*
60
);
HttpSession
session
=
request
.
getSession
(
);
session
.
setAttribute
(
AuthcConstants
.
SESSION_TENANTID
,
tenant
);
session
.
setAttribute
(
AuthcConstants
.
USERID
,
warehouseUser
.
getId
());
session
.
setAttribute
(
AuthcConstants
.
USERNAME
,
warehouseUser
.
getUsername
());
session
.
setAttribute
(
AuthcConstants
.
TELEPHONE
,
warehouseUser
.
getTelephone
());
session
.
setAttribute
(
AuthcConstants
.
TITLE
,
warehouseUser
.
getTitle
());
session
.
setAttribute
(
"mobile"
,
true
);
session
.
setMaxInactiveInterval
(
30
*
24
*
60
*
60
);
//砂场用户可能没有租户
loginLog
.
setTenantId
(
tenant
);
loginLog
.
setDescription
(
"warehouseUser login"
);
loginLogService
.
insert
(
loginLog
);
...
...
This diff is collapsed.
Click to expand it.
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