Commit a3f3d64d by 朱瑞泽

代码调整

parent 6609cd3d
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment