From 18e919bde3d925ee76fe29c7a6621c2716b1e4e4 Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期五, 21 三月 2025 09:43:31 +0800 Subject: [PATCH] feat(social): 添加 Keycloak社交登录支持 --- ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/maxkey/AuthMaxKeyRequest.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/maxkey/AuthMaxKeyRequest.java b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/maxkey/AuthMaxKeyRequest.java index e8df79e..97774ac 100644 --- a/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/maxkey/AuthMaxKeyRequest.java +++ b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/maxkey/AuthMaxKeyRequest.java @@ -30,7 +30,7 @@ } @Override - protected AuthToken getAccessToken(AuthCallback authCallback) { + public AuthToken getAccessToken(AuthCallback authCallback) { String body = doPostAuthorizationCode(authCallback.getCode()); Dict object = JsonUtils.parseMap(body); // oauth/token 楠岃瘉寮傚父 @@ -51,7 +51,7 @@ } @Override - protected AuthUser getUserInfo(AuthToken authToken) { + public AuthUser getUserInfo(AuthToken authToken) { String body = doGetUserInfo(authToken); Dict object = JsonUtils.parseMap(body); // oauth/token 楠岃瘉寮傚父 @@ -63,9 +63,9 @@ throw new AuthException(object.getStr("message")); } return AuthUser.builder() - .uuid(object.getStr("id")) + .uuid(object.getStr("userId")) .username(object.getStr("username")) - .nickname(object.getStr("name")) + .nickname(object.getStr("displayName")) .avatar(object.getStr("avatar_url")) .blog(object.getStr("web_url")) .company(object.getStr("organization")) -- Gitblit v1.9.3