Compare commits
3 Commits
81bc9757eb
...
e70fa733ef
| Author | SHA1 | Date | |
|---|---|---|---|
| e70fa733ef | |||
|
|
56e09151e4 | ||
|
|
7a9ae35c18 |
@@ -9,28 +9,28 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
# MYSQL数据库 主库,业务库
|
# MYSQL数据库 主库,业务库
|
||||||
url: jdbc:mysql://127.0.0.1:3306/demo?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://10.9.0.16:3307/gr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true&lowerCaseTableNames=1 # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: qihua
|
||||||
lideeyunji: # 从库,框架库
|
lideeyunji: # 从库,框架库
|
||||||
url: jdbc:mysql://127.0.0.1:3306/demo?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://10.9.0.16:3307/gr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&lowerCaseTableNames=1 # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: qihua
|
||||||
slave: # 日志库单独
|
slave: # 日志库单独
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:mysql://127.0.0.1:3306/demo?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://10.9.0.16:3307/dgr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&lowerCaseTableNames=1 # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: qihua
|
||||||
bidb: # 日志库单独
|
bidb: # 日志库单独
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:mysql://127.0.0.1:3306/erp_bi_data?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://10.9.0.16:3307/erp_bi_data?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&lowerCaseTableNames=1 # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: qihua
|
||||||
redis:
|
redis:
|
||||||
host: 127.0.0.1 # 地址
|
host: 10.9.0.116 # 地址
|
||||||
port: 6379 # 端口
|
port: 6379 # 端口
|
||||||
database: 2 # 数据库索引
|
database: 2 # 数据库索引
|
||||||
password: lidee@123 # 密码,建议生产环境开启
|
password: 123456 # 密码,建议生产环境开启
|
||||||
|
|
||||||
--- #################### 地代码平台相关配置 ####################
|
--- #################### 地代码平台相关配置 ####################
|
||||||
|
|
||||||
|
|||||||
@@ -9,28 +9,28 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
# MYSQL数据库 主库,业务库
|
# MYSQL数据库 主库,业务库
|
||||||
url: jdbc:mysql://127.0.0.1:3306/demo?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://10.9.0.16:3307/gr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true&lowerCaseTableNames=1 # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: qihua
|
||||||
lideeyunji: # 从库,框架库
|
lideeyunji: # 从库,框架库
|
||||||
url: jdbc:mysql://127.0.0.1:3306/demo?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://10.9.0.16:3307/gr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&lowerCaseTableNames=1 # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: qihua
|
||||||
slave: # 日志库单独
|
slave: # 日志库单独
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:mysql://127.0.0.1:3306/demo?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://10.9.0.16:3307/dgr_repoort?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&lowerCaseTableNames=1 # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: qihua
|
||||||
bidb: # 日志库单独
|
bidb: # 日志库单独
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:mysql://127.0.0.1:3306/erp_bi_data?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://10.9.0.16:3307/erp_bi_data?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&lowerCaseTableNames=1 # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: qihua
|
||||||
redis:
|
redis:
|
||||||
host: 127.0.0.1 # 地址
|
host: 10.9.0.116 # 地址
|
||||||
port: 6379 # 端口
|
port: 6379 # 端口
|
||||||
database: 2 # 数据库索引
|
database: 2 # 数据库索引
|
||||||
password: lidee@123 # 密码,建议生产环境开启
|
password: 123456 # 密码,建议生产环境开启
|
||||||
|
|
||||||
--- #################### 地代码平台相关配置 ####################
|
--- #################### 地代码平台相关配置 ####################
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -22,6 +22,9 @@ public class OAuth2ClientRespVO {
|
|||||||
@Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "土豆")
|
@Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "土豆")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "应用分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "category1")
|
||||||
|
private String category;
|
||||||
|
|
||||||
@Schema(description = "应用图标", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.png")
|
@Schema(description = "应用图标", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.png")
|
||||||
private String logo;
|
private String logo;
|
||||||
|
|
||||||
@@ -37,8 +40,11 @@ public class OAuth2ClientRespVO {
|
|||||||
@Schema(description = "刷新令牌的有效期", requiredMode = Schema.RequiredMode.REQUIRED, example = "8640000")
|
@Schema(description = "刷新令牌的有效期", requiredMode = Schema.RequiredMode.REQUIRED, example = "8640000")
|
||||||
private Integer refreshTokenValiditySeconds;
|
private Integer refreshTokenValiditySeconds;
|
||||||
|
|
||||||
|
// @Schema(description = "可重定向的 URI 地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
|
||||||
|
// private List<String> redirectUris;
|
||||||
|
|
||||||
@Schema(description = "可重定向的 URI 地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
|
@Schema(description = "可重定向的 URI 地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
|
||||||
private List<String> redirectUris;
|
private String redirectUris;
|
||||||
|
|
||||||
@Schema(description = "授权类型,参见 OAuth2GrantTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "password")
|
@Schema(description = "授权类型,参见 OAuth2GrantTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "password")
|
||||||
private List<String> authorizedGrantTypes;
|
private List<String> authorizedGrantTypes;
|
||||||
@@ -55,6 +61,9 @@ public class OAuth2ClientRespVO {
|
|||||||
@Schema(description = "资源", example = "1024")
|
@Schema(description = "资源", example = "1024")
|
||||||
private List<String> resourceIds;
|
private List<String> resourceIds;
|
||||||
|
|
||||||
|
@Schema(description = "回调URI地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
|
||||||
|
private String callbackUris;
|
||||||
|
|
||||||
@Schema(description = "附加信息", example = "{yunai: true}")
|
@Schema(description = "附加信息", example = "{yunai: true}")
|
||||||
private String additionalInformation;
|
private String additionalInformation;
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ public class OAuth2ClientSaveReqVO {
|
|||||||
@NotNull(message = "应用名不能为空")
|
@NotNull(message = "应用名不能为空")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "应用分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "category1")
|
||||||
|
@NotNull(message = "应用分类不能为空")
|
||||||
|
private String category;
|
||||||
|
|
||||||
@Schema(description = "应用图标", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.png")
|
@Schema(description = "应用图标", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.png")
|
||||||
@NotNull(message = "应用图标不能为空")
|
@NotNull(message = "应用图标不能为空")
|
||||||
@URL(message = "应用图标的地址不正确")
|
@URL(message = "应用图标的地址不正确")
|
||||||
@@ -50,9 +54,13 @@ public class OAuth2ClientSaveReqVO {
|
|||||||
@NotNull(message = "刷新令牌的有效期不能为空")
|
@NotNull(message = "刷新令牌的有效期不能为空")
|
||||||
private Integer refreshTokenValiditySeconds;
|
private Integer refreshTokenValiditySeconds;
|
||||||
|
|
||||||
|
// @Schema(description = "可重定向的 URI 地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
|
||||||
|
// @NotNull(message = "可重定向的 URI 地址不能为空")
|
||||||
|
// private List<@NotEmpty(message = "重定向的 URI 不能为空") @URL(message = "重定向的 URI 格式不正确") String> redirectUris;
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "可重定向的 URI 地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
|
@Schema(description = "可重定向的 URI 地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
|
||||||
@NotNull(message = "可重定向的 URI 地址不能为空")
|
private String redirectUris;
|
||||||
private List<@NotEmpty(message = "重定向的 URI 不能为空") @URL(message = "重定向的 URI 格式不正确") String> redirectUris;
|
|
||||||
|
|
||||||
@Schema(description = "授权类型,参见 OAuth2GrantTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "password")
|
@Schema(description = "授权类型,参见 OAuth2GrantTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "password")
|
||||||
@NotNull(message = "授权类型不能为空")
|
@NotNull(message = "授权类型不能为空")
|
||||||
@@ -73,6 +81,9 @@ public class OAuth2ClientSaveReqVO {
|
|||||||
@Schema(description = "附加信息", example = "{yunai: true}")
|
@Schema(description = "附加信息", example = "{yunai: true}")
|
||||||
private String additionalInformation;
|
private String additionalInformation;
|
||||||
|
|
||||||
|
@Schema(description = "回调URI地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
|
||||||
|
private String callbackUris;
|
||||||
|
|
||||||
@AssertTrue(message = "附加信息必须是 JSON 格式")
|
@AssertTrue(message = "附加信息必须是 JSON 格式")
|
||||||
public boolean isAdditionalInformationJson() {
|
public boolean isAdditionalInformationJson() {
|
||||||
return StrUtil.isEmpty(additionalInformation) || JsonUtils.isJson(additionalInformation);
|
return StrUtil.isEmpty(additionalInformation) || JsonUtils.isJson(additionalInformation);
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ public class OAuth2ClientDO extends BaseDO {
|
|||||||
* 应用名
|
* 应用名
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
/**
|
||||||
|
* 应用分类
|
||||||
|
*/
|
||||||
|
private String category;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用图标
|
* 应用图标
|
||||||
*/
|
*/
|
||||||
@@ -65,11 +70,14 @@ public class OAuth2ClientDO extends BaseDO {
|
|||||||
* 刷新令牌的有效期
|
* 刷新令牌的有效期
|
||||||
*/
|
*/
|
||||||
private Integer refreshTokenValiditySeconds;
|
private Integer refreshTokenValiditySeconds;
|
||||||
/**
|
// /**
|
||||||
* 可重定向的 URI 地址
|
// * 可重定向的 URI 地址
|
||||||
*/
|
// */
|
||||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
// @TableField(typeHandler = JacksonTypeHandler.class)
|
||||||
private List<String> redirectUris;
|
// private List<String> redirectUris;
|
||||||
|
|
||||||
|
private String redirectUris;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 授权类型(模式)
|
* 授权类型(模式)
|
||||||
*
|
*
|
||||||
@@ -99,6 +107,12 @@ public class OAuth2ClientDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||||
private List<String> resourceIds;
|
private List<String> resourceIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回调URI地址
|
||||||
|
*/
|
||||||
|
private String callbackUris;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附加信息,JSON 格式
|
* 附加信息,JSON 格式
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -136,7 +136,10 @@ public class OAuth2ClientServiceImpl implements IOAuth2ClientService {
|
|||||||
throw exception(OAUTH2_CLIENT_SCOPE_OVER);
|
throw exception(OAUTH2_CLIENT_SCOPE_OVER);
|
||||||
}
|
}
|
||||||
// 校验回调地址
|
// 校验回调地址
|
||||||
if (StrUtil.isNotEmpty(redirectUri) && !StrUtils.startWithAny(redirectUri, client.getRedirectUris())) {
|
// if (StrUtil.isNotEmpty(redirectUri) && !StrUtils.startWithAny(redirectUri, client.getRedirectUris())) {
|
||||||
|
// throw exception(OAUTH2_CLIENT_REDIRECT_URI_NOT_MATCH, redirectUri);
|
||||||
|
// }
|
||||||
|
if (StrUtil.isNotEmpty(redirectUri) && ObjectUtil.notEqual(client.getRedirectUris(), redirectUri)) {
|
||||||
throw exception(OAUTH2_CLIENT_REDIRECT_URI_NOT_MATCH, redirectUri);
|
throw exception(OAUTH2_CLIENT_REDIRECT_URI_NOT_MATCH, redirectUri);
|
||||||
}
|
}
|
||||||
return client;
|
return client;
|
||||||
|
|||||||
Reference in New Issue
Block a user