Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
loginservice
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
lanmw
loginservice
Commits
cfa1e5e8
Commit
cfa1e5e8
authored
Feb 05, 2021
by
chenzx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tbsso,添加session日志打印
parent
969f2a0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
12 deletions
+7
-12
LoginManagement.java
src/main/java/com/keymobile/proxy/api/LoginManagement.java
+3
-6
RESTAuthenticationSuccessHandler.java
...eymobile/proxy/conf/RESTAuthenticationSuccessHandler.java
+4
-6
No files found.
src/main/java/com/keymobile/proxy/api/LoginManagement.java
View file @
cfa1e5e8
...
@@ -20,13 +20,10 @@ public class LoginManagement {
...
@@ -20,13 +20,10 @@ public class LoginManagement {
@RequestMapping
(
value
=
"/sessionInfo"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/sessionInfo"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
Map
<
String
,
Object
>
verifyLogin
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
@ResponseBody
Map
<
String
,
Object
>
verifyLogin
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Cookie
[]
cookies
=
request
.
getCookies
();
if
(
null
==
request
.
getSession
()){
if
(
null
==
cookies
){
System
.
out
.
println
(
"sessionInfo--SessionID-->null"
);
System
.
out
.
println
(
"sessionInfo--cookie-->null"
);
}
else
{
}
else
{
for
(
Cookie
cookie
:
cookies
)
{
System
.
out
.
println
(
"sessionInfo--SessionID-->"
+
request
.
getSession
().
getId
());
System
.
out
.
println
(
"sessionInfo--cookie-->"
+
cookie
.
getName
()+
":"
+
cookie
.
getValue
());
}
}
}
UserDetails
userDetails
=
(
UserDetails
)
SecurityContextHolder
.
getContext
().
getAuthentication
().
getPrincipal
();
UserDetails
userDetails
=
(
UserDetails
)
SecurityContextHolder
.
getContext
().
getAuthentication
().
getPrincipal
();
Map
<
String
,
Object
>
rs
=
new
HashMap
<>();
Map
<
String
,
Object
>
rs
=
new
HashMap
<>();
...
...
src/main/java/com/keymobile/proxy/conf/RESTAuthenticationSuccessHandler.java
View file @
cfa1e5e8
...
@@ -36,13 +36,11 @@ public class RESTAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuc
...
@@ -36,13 +36,11 @@ public class RESTAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuc
}
}
String
returnStatus
=
data
;
String
returnStatus
=
data
;
//check if allow root login
//check if allow root login
Cookie
[]
cookies
=
request
.
getCookies
();
if
(
null
==
cookies
){
if
(
null
==
request
.
getSession
()
){
System
.
out
.
println
(
"RESTAuthenticationSuccessHandler--
cookie
-->null"
);
System
.
out
.
println
(
"RESTAuthenticationSuccessHandler--
SessionID
-->null"
);
}
else
{
}
else
{
for
(
Cookie
cookie
:
cookies
)
{
System
.
out
.
println
(
"RESTAuthenticationSuccessHandler--SessionID-->"
+
request
.
getSession
().
getId
());
System
.
out
.
println
(
"RESTAuthenticationSuccessHandler--cookie-->"
+
cookie
.
getName
()+
":"
+
cookie
.
getValue
());
}
}
}
UserDetails
userDetails
=
(
UserDetails
)
authentication
.
getPrincipal
();
UserDetails
userDetails
=
(
UserDetails
)
authentication
.
getPrincipal
();
...
...
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