Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-demo-single
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
gic_demo
gic-demo-single
Commits
6c4b33b7
Commit
6c4b33b7
authored
Jul 10, 2019
by
朱瑞泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码调整
parent
eb8eebeb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
AuthcenterTestController.java
.../demo/single/web/controller/AuthcenterTestController.java
+24
-2
No files found.
gic-demo-single-web/src/main/java/com/gic/demo/single/web/controller/AuthcenterTestController.java
View file @
6c4b33b7
...
...
@@ -53,8 +53,30 @@ public class AuthcenterTestController {
* @return 用户详情
*/
@RequestMapping
(
"/authcenter-code-callback"
)
public
String
authcenterCodeCallback
(
@RequestParam
(
name
=
"code"
)
String
code
)
{
return
JSON
.
toJSONString
(
gicAuthcenterManager
.
processCode
(
code
));
public
String
authcenterCodeCallback
(
@RequestParam
(
name
=
"code"
)
String
code
,
HttpServletResponse
response
)
{
// 也可以直接调用 gicAuthcenterManager.processCode(code) 获取用户信息,session user 需要自己维护
return
JSON
.
toJSONString
(
gicAuthcenterManager
.
login
(
code
,
response
));
}
/**
* 获取用户详情
*
* @return 用户详情
*/
@RequestMapping
(
"/get-login-user"
)
public
String
getLoginUser
()
{
return
JSON
.
toJSONString
(
gicAuthcenterManager
.
getLoginUser
());
}
/**
* 获取用户详情
*
* @return 用户详情
*/
@RequestMapping
(
"/logout"
)
public
String
logout
()
{
gicAuthcenterManager
.
logout
();
return
"ok"
;
}
/**
...
...
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