Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sh-authcenter
Project
Project
Details
Activity
Releases
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
李良停
sh-authcenter
Commits
a8c69dbb
Commit
a8c69dbb
authored
Jan 18, 2021
by
李良停
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
llt
parent
fcb9c5a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
AuthController.java
...hineseall/authcenter/agent/controller/AuthController.java
+8
-0
No files found.
sh-authcenter-agent/src/main/java/com/chineseall/authcenter/agent/controller/AuthController.java
View file @
a8c69dbb
...
...
@@ -59,6 +59,7 @@ public class AuthController {
try
{
String
clientId
=
request
.
getParameter
(
"client_id"
);
String
returnUrl
=
request
.
getParameter
(
"redirect_uri"
);
System
.
out
.
println
(
"redirect_uri1111111111111====="
+
returnUrl
);
String
authSource
=
request
.
getParameter
(
"auth_source"
);
ClientItem
clientItem
=
clientItemMap
.
get
(
clientId
);
if
(
null
==
clientItem
)
{
...
...
@@ -99,6 +100,7 @@ public class AuthController {
authLog
.
setClientName
(
clientItemMap
.
get
(
clientId
).
getClientName
());
authLogService
.
save
(
authLog
);
CookiesUtil
.
setCookie
(
response
,
null
,
COOKIE_LOG_ID
,
authLog
.
getId
(),
1
);
CookiesUtil
.
setCookie
(
response
,
null
,
"return_url"
,
returnUrl
,
1
);
Map
<
String
,
String
>
params
=
new
HashMap
<>();
params
.
put
(
"redirect_uri"
,
returnUrl
);
params
.
put
(
"auth_log_id"
,
authLog
.
getId
());
...
...
@@ -133,6 +135,7 @@ public class AuthController {
public
ModelAndView
toLogin
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ModelAndView
modelAndView
=
new
ModelAndView
();
String
loginUrl
=
request
.
getParameter
(
"loginUrl"
);
System
.
out
.
println
(
"loginUrl222222222222222====="
+
loginUrl
);
String
idp
=
request
.
getParameter
(
"idp"
);
try
{
String
authLogId
=
CookiesUtil
.
getCookie
(
request
,
COOKIE_LOG_ID
);
...
...
@@ -163,6 +166,11 @@ public class AuthController {
public
ModelAndView
loginsuccess
(
HttpServletRequest
request
,
HttpServletResponse
response
,
ModelAndView
modelAndView
)
throws
IOException
{
modelAndView
.
setViewName
(
"loginsuccess"
);
String
returnUrl
=
request
.
getParameter
(
"redirect_uri"
);
String
cookieReturnUrl
=
CookiesUtil
.
getCookie
(
request
,
"return_url"
);
if
(
cookieReturnUrl
!=
null
){
returnUrl
=
cookieReturnUrl
;
}
System
.
out
.
println
(
"redirect_uri33333333333333333====="
+
returnUrl
);
String
authLogId
=
request
.
getParameter
(
"auth_log_id"
);
ClientDataInfo
clientDataInfo
=
getUserInfoData
(
request
);
AuthLog
authLog
=
authLogService
.
getById
(
authLogId
);
...
...
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