Skip to content

Commit

Permalink
refactor: 适配 ContiNew Starter 认证模块-JustAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Nov 25, 2023
1 parent 86ca8f0 commit 7ad8d17
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 197 deletions.
16 changes: 6 additions & 10 deletions continew-admin-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
<description>公共模块(存放公共工具类,公共配置等)</description>

<dependencies>
<!-- ContiNew Starter 认证模块 - JustAuth -->
<dependency>
<groupId>top.charles7c.continew</groupId>
<artifactId>continew-starter-auth-justauth</artifactId>
</dependency>

<!-- ContiNew Starter 认证模块 - SaToken -->
<dependency>
<groupId>top.charles7c.continew</groupId>
Expand Down Expand Up @@ -84,16 +90,6 @@
<artifactId>sms4j-spring-boot-starter</artifactId>
</dependency>

<!-- Just Auth(开箱即用的整合第三方登录的开源组件,脱离繁琐的第三方登录 SDK,让登录变得 So easy!) -->
<dependency>
<groupId>com.xkcoding.justauth</groupId>
<artifactId>justauth-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
</dependency>

<!-- Easy Excel(一个基于 Java 的、快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
<dependency>
<groupId>com.alibaba</groupId>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,4 @@ public class CacheConstants {
* 仪表盘缓存键前缀
*/
public static final String DASHBOARD_KEY_PREFIX = "DASHBOARD";

/**
* 三方账号认证状态键前缀
*/
public static final String SOCIAL_AUTH_STATE_KEY_PREFIX = "SOCIAL_AUTH_STATE";
}

This file was deleted.

30 changes: 15 additions & 15 deletions continew-admin-webapi/src/main/resources/config/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,6 @@ spring.cache:
# 是否允许缓存空值(默认 true,表示允许,可以解决缓存穿透问题)
cache-null-values: true

--- ### Just Auth 配置
justauth:
enabled: true
type:
GITEE:
client-id: 5d271b7f638941812aaf8bfc2e2f08f06d6235ef934e0e39537e2364eb8452c4
client-secret: 1f7d08**********5b7**********29e
redirect-uri: ${project.url}/social/callback?source=gitee
GITHUB:
client-id: 38080dad08cfbdfacca9
client-secret: 1f7d08**********5b7**********29e
redirect-uri: ${project.url}/social/callback?source=github
cache:
type: custom

--- ### 短信配置
sms:
# 从 YAML 读取配置
Expand Down Expand Up @@ -177,6 +162,21 @@ springdoc:
swagger-ui:
enabled: true

--- ### Just Auth 配置
justauth:
enabled: true
type:
GITEE:
client-id: 5d271b7f638941812aaf8bfc2e2f08f06d6235ef934e0e39537e2364eb8452c4
client-secret: 1f7d08**********5b7**********29e
redirect-uri: ${project.url}/social/callback?source=gitee
GITHUB:
client-id: 38080dad08cfbdfacca9
client-secret: 1f7d08**********5b7**********29e
redirect-uri: ${project.url}/social/callback?source=github
cache:
type: custom

--- ### Sa-Token 扩展配置
sa-token.extension:
# 安全配置:排除(放行)路径配置
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,6 @@ spring.cache:
# 是否允许缓存空值(默认 true,表示允许,可以解决缓存穿透问题)
cache-null-values: true

--- ### Just Auth 配置
justauth:
enabled: true
type:
GITEE:
client-id: 5d271b7f638941812aaf8bfc2e2f08f06d6235ef934e0e39537e2364eb8452c4
client-secret: 1f7d08**********5b7**********29e
redirect-uri: ${project.url}/social/callback?source=gitee
GITHUB:
client-id: 38080dad08cfbdfacca9
client-secret: 1f7d08**********5b7**********29e
redirect-uri: ${project.url}/social/callback?source=github
cache:
type: custom

--- ### 短信配置
sms:
# 从 YAML 读取配置
Expand Down Expand Up @@ -183,6 +168,21 @@ knife4j:
# 开启生产环境屏蔽
production: true

--- ### Just Auth 配置
justauth:
enabled: true
type:
GITEE:
client-id: 5d271b7f638941812aaf8bfc2e2f08f06d6235ef934e0e39537e2364eb8452c4
client-secret: 1f7d08**********5b7**********29e
redirect-uri: ${project.url}/social/callback?source=gitee
GITHUB:
client-id: 38080dad08cfbdfacca9
client-secret: 1f7d08**********5b7**********29e
redirect-uri: ${project.url}/social/callback?source=github
cache:
type: custom

--- ### Sa-Token 扩展配置
sa-token.extension:
# 安全配置:排除(放行)路径配置
Expand Down
23 changes: 0 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

<!-- ### 工具库相关 ### -->
<sms4j.version>3.0.4</sms4j.version>
<justauth.version>1.16.5</justauth.version>
<easyexcel.version>3.3.2</easyexcel.version>
<ip2region.version>3.1.5.1</ip2region.version>

Expand All @@ -56,28 +55,6 @@
<version>${sms4j.version}</version>
</dependency>

<!-- Just Auth(开箱即用的整合第三方登录的开源组件,脱离繁琐的第三方登录 SDK,让登录变得 So easy!) -->
<dependency>
<groupId>com.xkcoding.justauth</groupId>
<artifactId>justauth-spring-boot-starter</artifactId>
<version>1.4.0</version>
<exclusions>
<exclusion>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
</exclusion>
<exclusion>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>${justauth.version}</version>
</dependency>

<!-- Easy Excel(一个基于 Java 的、快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
<dependency>
<groupId>com.alibaba</groupId>
Expand Down

0 comments on commit 7ad8d17

Please sign in to comment.