From 850d028ec76c22604dce3838b6ef45264680a636 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 19 Jun 2023 09:47:01 +0800 Subject: [PATCH 01/12] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=E5=8D=8E?= =?UTF-8?q?=E4=B8=BA=E4=BA=91maven=20aliyun=E5=90=8C=E6=AD=A5=E9=80=9F?= =?UTF-8?q?=E5=BA=A6=E6=85=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4f1350a10..932c206d0 100644 --- a/pom.xml +++ b/pom.xml @@ -96,8 +96,13 @@ - + + + huaweicloud + huawei + https://mirrors.huaweicloud.com/repository/maven/ + aliyunmaven aliyun From 7fc1016e903a68637981db4a3b109771aed95132 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 19 Jun 2023 09:47:18 +0800 Subject: [PATCH 02/12] chore: up captcha-plus 1.0.4 --- yudao-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 0ca928387..ebbe54574 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -43,7 +43,7 @@ 6.8.0 - 1.0.2 + 1.0.4 1.15.4 1.18.26 1.5.5.Final From bdb18b4cedd11daa84c4a2db9c8c93f28b2917e8 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:26:38 +0800 Subject: [PATCH 03/12] chore: up springboot 2.7.13 --- pom.xml | 2 +- yudao-dependencies/pom.xml | 2 +- yudao-example/yudao-sso-demo-by-code/pom.xml | 2 +- yudao-example/yudao-sso-demo-by-password/pom.xml | 2 +- yudao-server/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 932c206d0..ac9d96dc0 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ 3.8.1 1.18.26 - 2.7.12 + 2.7.13 1.5.5.Final UTF-8 diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index ebbe54574..62e86a0d1 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -16,7 +16,7 @@ 1.7.3-snapshot - 2.7.12 + 2.7.13 1.6.15 4.1.0 diff --git a/yudao-example/yudao-sso-demo-by-code/pom.xml b/yudao-example/yudao-sso-demo-by-code/pom.xml index d3f745dba..bde80276b 100644 --- a/yudao-example/yudao-sso-demo-by-code/pom.xml +++ b/yudao-example/yudao-sso-demo-by-code/pom.xml @@ -21,7 +21,7 @@ 8 UTF-8 - 2.7.12 + 2.7.13 diff --git a/yudao-example/yudao-sso-demo-by-password/pom.xml b/yudao-example/yudao-sso-demo-by-password/pom.xml index d6e73916d..8b81b87d6 100644 --- a/yudao-example/yudao-sso-demo-by-password/pom.xml +++ b/yudao-example/yudao-sso-demo-by-password/pom.xml @@ -21,7 +21,7 @@ 8 UTF-8 - 2.7.12 + 2.7.13 diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index fdfa88415..25539cb63 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -111,7 +111,7 @@ org.springframework.boot spring-boot-maven-plugin - 2.7.12 + 2.7.13 true From 0899f5fd29819962b5d57f66c9c0eaf0ea35c443 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:27:06 +0800 Subject: [PATCH 04/12] docs: up springboot 2.10.12 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e2eb27acd..36e5bfc39 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,7 @@ ps:核心功能已经实现,正在对接微信小程序中... | 框架 | 说明 | 版本 | 学习指南 | |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------| -| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.12 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | +| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.13 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | | | [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.16 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) | From 02fe0329e41461869ed35c4312d5a2bf25201a99 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:29:26 +0800 Subject: [PATCH 05/12] chore: up druid 1.2.18 --- yudao-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 62e86a0d1..dae6b252a 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -22,7 +22,7 @@ 4.1.0 2.5 - 1.2.16 + 1.2.18 3.5.3.1 3.5.3.1 3.6.1 From 4393c5da1cfcc941210fe1fee61b79465920edf3 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:30:00 +0800 Subject: [PATCH 06/12] docs: up Druid 1.2.18 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36e5bfc39..7a061e8ac 100644 --- a/README.md +++ b/README.md @@ -251,7 +251,7 @@ ps:核心功能已经实现,正在对接微信小程序中... |---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------| | [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.13 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | | [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | | -| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.16 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | +| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.18 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) | | [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.6.1 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | [Redis](https://redis.io/) | key-value 数据库 | 5.0 / 6.0 | | From d44c29296d3060d6226965c907ae11cd0e4ac15c Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:49:33 +0800 Subject: [PATCH 07/12] chore: up hutool 5.8.20 Lombok 1.18.28 --- pom.xml | 2 +- yudao-dependencies/pom.xml | 6 +++--- yudao-example/yudao-sso-demo-by-code/pom.xml | 2 +- yudao-example/yudao-sso-demo-by-password/pom.xml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index ac9d96dc0..d221cb4f4 100644 --- a/pom.xml +++ b/pom.xml @@ -38,7 +38,7 @@ 3.0.0-M5 3.8.1 - 1.18.26 + 1.18.28 2.7.13 1.5.5.Final UTF-8 diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index dae6b252a..0b75bd74c 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -45,10 +45,10 @@ 1.0.4 1.15.4 - 1.18.26 + 1.18.28 1.5.5.Final - 5.8.18 - 3.3.1 + 5.8.20 + 3.3.2 2.3 1.0.5 1.2.83 diff --git a/yudao-example/yudao-sso-demo-by-code/pom.xml b/yudao-example/yudao-sso-demo-by-code/pom.xml index bde80276b..dc0c0241e 100644 --- a/yudao-example/yudao-sso-demo-by-code/pom.xml +++ b/yudao-example/yudao-sso-demo-by-code/pom.xml @@ -52,7 +52,7 @@ cn.hutool hutool-all - 5.8.18 + 5.8.20 diff --git a/yudao-example/yudao-sso-demo-by-password/pom.xml b/yudao-example/yudao-sso-demo-by-password/pom.xml index 8b81b87d6..ee5d05390 100644 --- a/yudao-example/yudao-sso-demo-by-password/pom.xml +++ b/yudao-example/yudao-sso-demo-by-password/pom.xml @@ -52,7 +52,7 @@ cn.hutool hutool-all - 5.8.18 + 5.8.20 From c1782c432fbbd9720adeba2fd73886040db273fb Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:50:20 +0800 Subject: [PATCH 08/12] chore: up deps version --- yudao-dependencies/pom.xml | 10 +++++----- .../yudao-spring-boot-starter-biz-pay/pom.xml | 2 +- .../yudao-spring-boot-starter-biz-weixin/pom.xml | 5 ++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 0b75bd74c..48deffc03 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -26,7 +26,7 @@ 3.5.3.1 3.5.3.1 3.6.1 - 1.4.3.2 + 1.4.5 3.18.0 8.1.2.141 @@ -52,7 +52,7 @@ 2.3 1.0.5 1.2.83 - 32.0.0-jre + 32.0.1-jre 5.1.0 2.14.2 3.9.0 @@ -64,14 +64,14 @@ 3.0.0 4.10.0 2.11.0 - 8.5.2 + 8.5.4 4.6.3 2.2.1 3.1.758 1.4.0 - 1.5.6 + 1.5.8 2.12.2 - 4.3.0 + 4.5.0 diff --git a/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml index 2ccbc7ba2..3effb1952 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-biz-pay/pom.xml @@ -63,7 +63,7 @@ com.github.binarywang weixin-java-pay - 4.4.0 + 4.5.0 diff --git a/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml index 2dc37c376..e242819ef 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-biz-weixin/pom.xml @@ -34,14 +34,13 @@ com.github.binarywang - wx-java-mp-spring-boot-starter - 4.4.0 + 4.5.0 com.github.binarywang wx-java-miniapp-spring-boot-starter - 4.4.0 + 4.5.0 From 9826bd614baf4f12283c75acbe528678d1af3a28 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:50:41 +0800 Subject: [PATCH 09/12] docs: up Lombok 1.18.28 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a061e8ac..445e50014 100644 --- a/README.md +++ b/README.md @@ -267,7 +267,7 @@ ps:核心功能已经实现,正在对接微信小程序中... | [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.7.10 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) | | [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.13.3 | | | [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.5.5.Final | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) | -| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.18.26 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) | +| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.18.28 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) | | [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.8.2 | - | | [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 4.8.0 | - | From 8ea46b8fc21b6ffa9c4ab973e2cd6a6b03ec8624 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 16:53:08 +0800 Subject: [PATCH 10/12] =?UTF-8?q?fix:=20getNewPhoneNoInfo=20=E5=B7=B2?= =?UTF-8?q?=E8=BF=87=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/member/service/auth/MemberAuthServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java index d8c59ad37..58b637c6d 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java @@ -127,7 +127,7 @@ public class MemberAuthServiceImpl implements MemberAuthService { // 获得对应的手机号信息 WxMaPhoneNumberInfo phoneNumberInfo; try { - phoneNumberInfo = wxMaService.getUserService().getNewPhoneNoInfo(reqVO.getPhoneCode()); + phoneNumberInfo = wxMaService.getUserService().getPhoneNoInfo(reqVO.getPhoneCode()); } catch (Exception exception) { throw exception(AUTH_WEIXIN_MINI_APP_PHONE_CODE_ERROR); } From 7ad3b6ad2b1745ec3f6b1a01bcd2a6cf6b307442 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 21:08:56 +0800 Subject: [PATCH 11/12] chore: use com.xingyuv.justauth --- yudao-dependencies/pom.xml | 6 +++--- .../pom.xml | 4 ++-- .../config/YudaoSocialAutoConfiguration.java | 4 ++-- .../social/core/YudaoAuthRequestFactory.java | 12 +++++------ .../social/core/enums/AuthExtendSource.java | 10 ++++++++-- .../request/AuthWeChatMiniAppRequest.java | 20 +++++++++---------- .../service/social/SocialUserServiceImpl.java | 10 +++++----- .../social/SocialUserServiceImplTest.java | 12 +++++------ 8 files changed, 42 insertions(+), 36 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 48deffc03..a5ba9332b 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -68,7 +68,7 @@ 4.6.3 2.2.1 3.1.758 - 1.4.0 + 1.0.0 1.5.8 2.12.2 4.5.0 @@ -589,8 +589,8 @@ - com.xkcoding.justauth - justauth-spring-boot-starter + com.xingyuv + spring-boot-starter-justauth ${justauth.version} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml index 0e0ac6dc4..e39107918 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml @@ -36,8 +36,8 @@ - com.xkcoding.justauth - justauth-spring-boot-starter + com.xingyuv + spring-boot-starter-justauth cn.hutool diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java index 5c2f7f8bb..1812efeb9 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java @@ -1,11 +1,11 @@ package cn.iocoder.yudao.framework.social.config; import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory; +import com.xingyuv.jushauth.cache.AuthStateCache; +import com.xingyuv.justauth.autoconfigure.JustAuthProperties; import com.xkcoding.http.HttpUtil; import com.xkcoding.http.support.hutool.HutoolImpl; -import com.xkcoding.justauth.autoconfigure.JustAuthProperties; import lombok.extern.slf4j.Slf4j; -import me.zhyd.oauth.cache.AuthStateCache; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java index 22be344d9..5d5475e84 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/YudaoAuthRequestFactory.java @@ -4,12 +4,12 @@ import cn.hutool.core.util.EnumUtil; import cn.hutool.core.util.ReflectUtil; import cn.iocoder.yudao.framework.social.core.enums.AuthExtendSource; import cn.iocoder.yudao.framework.social.core.request.AuthWeChatMiniAppRequest; -import com.xkcoding.justauth.AuthRequestFactory; -import com.xkcoding.justauth.autoconfigure.JustAuthProperties; -import me.zhyd.oauth.cache.AuthStateCache; -import me.zhyd.oauth.config.AuthConfig; -import me.zhyd.oauth.config.AuthSource; -import me.zhyd.oauth.request.AuthRequest; +import com.xingyuv.jushauth.cache.AuthStateCache; +import com.xingyuv.jushauth.config.AuthConfig; +import com.xingyuv.jushauth.config.AuthSource; +import com.xingyuv.jushauth.request.AuthRequest; +import com.xingyuv.justauth.AuthRequestFactory; +import com.xingyuv.justauth.autoconfigure.JustAuthProperties; import java.lang.reflect.Method; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java index f51c81e02..fd0fff709 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/enums/AuthExtendSource.java @@ -1,11 +1,12 @@ package cn.iocoder.yudao.framework.social.core.enums; -import me.zhyd.oauth.config.AuthSource; +import com.xingyuv.jushauth.config.AuthSource; +import com.xingyuv.jushauth.request.AuthDefaultRequest; /** * 拓展 JustAuth 各 api 需要的 url, 用枚举类分平台类型管理 * - * 默认配置 {@link me.zhyd.oauth.config.AuthDefaultSource} + * 默认配置 {@link com.xingyuv.jushauth.config.AuthDefaultSource} * * @author timfruit */ @@ -34,6 +35,11 @@ public enum AuthExtendSource implements AuthSource { // 参见 https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html 文档 throw new UnsupportedOperationException("不支持获取用户信息 url,请使用小程序内置函数 wx.getUserProfile() 获取用户信息"); } + + @Override + public Class getTargetClass() { + return null; + } } } diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java index 5ff5b8578..2e98ac989 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java @@ -3,16 +3,16 @@ package cn.iocoder.yudao.framework.social.core.request; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.social.core.enums.AuthExtendSource; import com.fasterxml.jackson.annotation.JsonProperty; +import com.xingyuv.jushauth.cache.AuthStateCache; +import com.xingyuv.jushauth.config.AuthConfig; +import com.xingyuv.jushauth.exception.AuthException; +import com.xingyuv.jushauth.model.AuthCallback; +import com.xingyuv.jushauth.model.AuthToken; +import com.xingyuv.jushauth.model.AuthUser; +import com.xingyuv.jushauth.request.AuthDefaultRequest; +import com.xingyuv.jushauth.utils.HttpUtils; +import com.xingyuv.jushauth.utils.UrlBuilder; import lombok.Data; -import me.zhyd.oauth.cache.AuthStateCache; -import me.zhyd.oauth.config.AuthConfig; -import me.zhyd.oauth.exception.AuthException; -import me.zhyd.oauth.model.AuthCallback; -import me.zhyd.oauth.model.AuthToken; -import me.zhyd.oauth.model.AuthUser; -import me.zhyd.oauth.request.AuthDefaultRequest; -import me.zhyd.oauth.utils.HttpUtils; -import me.zhyd.oauth.utils.UrlBuilder; /** * 微信小程序登陆 Request 请求 @@ -32,7 +32,7 @@ public class AuthWeChatMiniAppRequest extends AuthDefaultRequest { protected AuthToken getAccessToken(AuthCallback authCallback) { // 参见 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html 文档 // 使用 code 获取对应的 openId、unionId 等字段 - String response = new HttpUtils(config.getHttpConfig()).get(accessTokenUrl(authCallback.getCode())); + String response = new HttpUtils(config.getHttpConfig()).get(accessTokenUrl(authCallback.getCode())).getBody(); JSCode2SessionResponse accessTokenObject = JsonUtils.parseObject(response, JSCode2SessionResponse.class); assert accessTokenObject != null; checkResponse(accessTokenObject); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java index 411d749b0..b6999bd01 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImpl.java @@ -10,12 +10,12 @@ import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; +import com.xingyuv.jushauth.model.AuthCallback; +import com.xingyuv.jushauth.model.AuthResponse; +import com.xingyuv.jushauth.model.AuthUser; +import com.xingyuv.jushauth.request.AuthRequest; +import com.xingyuv.jushauth.utils.AuthStateUtils; import lombok.extern.slf4j.Slf4j; -import me.zhyd.oauth.model.AuthCallback; -import me.zhyd.oauth.model.AuthResponse; -import me.zhyd.oauth.model.AuthUser; -import me.zhyd.oauth.request.AuthRequest; -import me.zhyd.oauth.utils.AuthStateUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; diff --git a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java index 48f914a1a..c4f0442a2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java +++ b/yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/social/SocialUserServiceImplTest.java @@ -9,12 +9,12 @@ import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper; import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper; import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum; -import me.zhyd.oauth.enums.AuthResponseStatus; -import me.zhyd.oauth.model.AuthCallback; -import me.zhyd.oauth.model.AuthResponse; -import me.zhyd.oauth.model.AuthUser; -import me.zhyd.oauth.request.AuthRequest; -import me.zhyd.oauth.utils.AuthStateUtils; +import com.xingyuv.jushauth.enums.AuthResponseStatus; +import com.xingyuv.jushauth.model.AuthCallback; +import com.xingyuv.jushauth.model.AuthResponse; +import com.xingyuv.jushauth.model.AuthUser; +import com.xingyuv.jushauth.request.AuthRequest; +import com.xingyuv.jushauth.utils.AuthStateUtils; import org.junit.jupiter.api.Test; import org.mockito.MockedStatic; import org.springframework.boot.test.mock.mockito.MockBean; From 3e9768374b82063112a2b33a1dd11ce2ff1048e1 Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Jun 2023 22:19:20 +0800 Subject: [PATCH 12/12] chore: up justauth 1.0.1 captcha-plus 1.0.5 --- yudao-dependencies/pom.xml | 4 ++-- .../framework/social/config/YudaoSocialAutoConfiguration.java | 4 ++-- .../social/core/request/AuthWeChatMiniAppRequest.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index a5ba9332b..1b9f8301a 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -43,7 +43,7 @@ 6.8.0 - 1.0.4 + 1.0.5 1.15.4 1.18.28 1.5.5.Final @@ -68,7 +68,7 @@ 4.6.3 2.2.1 3.1.758 - 1.0.0 + 1.0.1 1.5.8 2.12.2 4.5.0 diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java index 1812efeb9..3dc6b6a9a 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/config/YudaoSocialAutoConfiguration.java @@ -1,10 +1,10 @@ package cn.iocoder.yudao.framework.social.config; import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory; +import com.xingyuv.http.HttpUtil; +import com.xingyuv.http.support.hutool.HutoolImpl; import com.xingyuv.jushauth.cache.AuthStateCache; import com.xingyuv.justauth.autoconfigure.JustAuthProperties; -import com.xkcoding.http.HttpUtil; -import com.xkcoding.http.support.hutool.HutoolImpl; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java index 2e98ac989..964eb31cd 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-social/src/main/java/cn/iocoder/yudao/framework/social/core/request/AuthWeChatMiniAppRequest.java @@ -73,7 +73,7 @@ public class AuthWeChatMiniAppRequest extends AuthDefaultRequest { return UrlBuilder.fromBaseUrl(source.accessToken()) .queryParam("appid", config.getClientId()) .queryParam("secret", config.getClientSecret()) - .queryParam("js_code", code) // 和父类不同,所以需要重写该方法 + .queryParam("js_code", code) .queryParam("grant_type", "authorization_code") .build(); }