|
|
@@ -22,6 +22,7 @@ import com.cyksj.service.claude.ClaudeCodeService;
|
|
|
import com.cyksj.service.claude.OAuthClaudeCodeService;
|
|
|
import com.cyksj.service.claude.RelayService;
|
|
|
import com.cyksj.service.user.UserBindRelationService;
|
|
|
+import com.cyksj.service.user.UserService;
|
|
|
import com.cyksj.web.util.StpUserUtil;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
import com.ejlchina.searcher.SearchResult;
|
|
|
@@ -75,6 +76,7 @@ public class ClaudeCodeController {
|
|
|
|
|
|
private final GroupsMapper groupsMapper;
|
|
|
|
|
|
+ private final UserService userService;
|
|
|
/**
|
|
|
* 用户创建API KEY
|
|
|
*/
|
|
|
@@ -322,11 +324,13 @@ public class ClaudeCodeController {
|
|
|
if (oauthToken == null) {
|
|
|
throw BusinessRuntimeException.getInstance("Invalid or expired token");
|
|
|
}
|
|
|
-
|
|
|
+ User user = userService.getById(oauthToken.getUserId());
|
|
|
// 返回用户信息
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
result.put("authenticated", true);
|
|
|
result.put("userId", oauthToken.getUserId());
|
|
|
+ result.put("nickName", user.getNickname());
|
|
|
+ result.put("headImg", user.getHeadimgurl());
|
|
|
result.put("token", oauthToken.getKeyValue());
|
|
|
result.put("email", getUserEmail(oauthToken.getUserId()));
|
|
|
|