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
a3f3d64d
Commit
a3f3d64d
authored
Jun 18, 2019
by
朱瑞泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码调整
parent
6609cd3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
AuthcenterTestController.java
.../demo/single/web/controller/AuthcenterTestController.java
+15
-0
No files found.
gic-demo-single-web/src/main/java/com/gic/demo/single/web/controller/AuthcenterTestController.java
View file @
a3f3d64d
...
...
@@ -18,16 +18,31 @@ public class AuthcenterTestController {
@Autowired
private
GicAuthcenterManager
gicAuthcenterManager
;
/**
* @return 获取认证 url 用于前端访问
*/
@RequestMapping
(
"/get-authcenter-url"
)
public
String
getAuthcenterUrl
()
{
return
JSON
.
toJSONString
(
gicAuthcenterManager
.
getAuthorizeUrl
());
}
/**
* 接收授权 code
*
* @param code 授权 code
* @return 用户详情
*/
@RequestMapping
(
"/authcenter-code-callback"
)
public
String
authcenterCodeCallback
(
String
code
)
{
return
JSON
.
toJSONString
(
gicAuthcenterManager
.
processCode
(
code
));
}
/**
* 获取用户详情
*
* @param id 用户 id
* @return 用户详情
*/
@RequestMapping
(
"/get-user-details"
)
public
String
getUserDetails
(
Integer
id
)
{
try
{
...
...
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