Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
254ab67b
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
8 个月 前同步成功
通知
75
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
254ab67b
编写于
9月 27, 2021
作者:
MaxKey单点登录官方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
v 3.0.0 GA ReleaseNotes &StringUtils
上级
d1cf1804
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
25 addition
and
56 deletion
+25
-56
ReleaseNotes.txt
ReleaseNotes.txt
+7
-4
maxkey-common/src/main/java/org/maxkey/util/StringUtils.java
maxkey-common/src/main/java/org/maxkey/util/StringUtils.java
+14
-48
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/RegistrationController.java
...ava/org/maxkey/web/contorller/RegistrationController.java
+1
-1
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/SafeController.java
...c/main/java/org/maxkey/web/contorller/SafeController.java
+1
-1
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/filter/SingleSignOnFilter.java
...c/main/java/org/maxkey/web/filter/SingleSignOnFilter.java
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/UserInfoController.java
...in/java/org/maxkey/web/contorller/UserInfoController.java
+1
-1
未找到文件。
ReleaseNotes.txt
浏览文件 @
254ab67b
MaxKey v 3.0.0 GA 2021/09/29
*(MAXKEY-210701) 好雨科技Rainbond适配
*(MAXKEY-210701) 好雨科技Rainbond适配
,实现基于Rainbond应用商店的快速部署
*(MAXKEY-210702) 制定MaxKey技术路线图
*(MAXKEY-210703) CHINER元数建模构建MaxKEY ER模型完善,数据库字段说明完善
*(MAXKEY-210704) Nacos配置中心支持
*(MAXKEY-210705) springcloud &springcloud alibaba支持
*(MAXKEY-210704) Nacos配置中心支持
,可选支持本地和Nacos配置中心配置,配置更加灵活
*(MAXKEY-210705) springcloud &springcloud alibaba
微服务
支持
*(MAXKEY-210706) spring cloud gateway支持
*(MAXKEY-210707) application.properties参数调整和优化,支持外部Docker及环境变量的配置
*(MAXKEY-210708) 同步器定时任务功能优化
...
...
@@ -24,7 +24,10 @@
*(MAXKEY-210723) mgt登录错误提示信息
*(MAXKEY-210724) 警告提示信息修复
*(MAXKEY-210725) 工具类增强和优化
*(MAXKEY-210726) 依赖jar引用、更新和升级
*(MAXKEY-210726) 登录认证优化,增加密码策略应用和验证
*(MAXKEY-210727) CAS登录中参数回传的修复,增加'#'停止符的优化
*(MAXKEY-210728) StringUtils优化,直接继承org.apache.commons.lang3.StringUtils,增加自有逻辑
*(MAXKEY-210729) 依赖jar引用、更新和升级
spring 5.3.10
springBoot 2.5.5
springkafka 2.7.7
...
...
maxkey-common/src/main/java/org/maxkey/util/StringUtils.java
浏览文件 @
254ab67b
...
...
@@ -27,41 +27,7 @@ import java.util.Map;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
public
final
class
StringUtils
{
/**
* avoid null, and return value trim.
*
* @param value string value.
* @return the trim of value.
*/
public
static
String
avoidNull
(
String
value
)
{
return
(
value
==
null
)
?
""
:
value
.
trim
();
}
public
static
boolean
isNull
(
String
value
)
{
return
value
==
null
;
}
/**
* @param value string value
* @return value
*/
public
static
boolean
isNullOrBlank
(
String
value
)
{
return
value
==
null
||
""
.
equals
(
value
.
trim
());
}
public
static
boolean
isNotEmpty
(
String
value
)
{
return
!
isNullOrBlank
(
value
);
}
public
static
boolean
isNotNullAndEquals
(
String
value
,
String
equalString
)
{
return
!
isNullOrBlank
(
value
)
&&
value
.
equals
(
equalString
);
}
public
static
boolean
isNotNullAndEqualsIgnoreCase
(
String
value
,
String
equalString
)
{
return
!
isNullOrBlank
(
value
)
&&
value
.
equalsIgnoreCase
(
equalString
);
}
public
final
class
StringUtils
extends
org
.
apache
.
commons
.
lang3
.
StringUtils
{
/*
* 获取指定UTF-8模式字节长度的字符串
...
...
@@ -441,20 +407,20 @@ public final class StringUtils {
* catch (BadHanyuPinyinOutputFormatCombination e) { e.printStackTrace(); }
* }else{ pinyin += nameChar[i]; } } return pinyin; }
*/
public
static
Map
<
String
,
String
>
aduserName2Map
(
String
a
du
serName
)
{
if
(
is
NullOrBlank
(
adu
serName
))
{
public
static
Map
<
String
,
String
>
aduserName2Map
(
String
a
ctiveDirectoryU
serName
)
{
if
(
is
Empty
(
activeDirectoryU
serName
))
{
return
null
;
}
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
int
index
=
0
;
if
((
index
=
a
du
serName
.
indexOf
(
"\\"
))
>
0
)
{
map
.
put
(
"domain"
,
a
du
serName
.
substring
(
0
,
index
));
map
.
put
(
"userName"
,
a
duserName
.
substring
(
index
+
1
,
adu
serName
.
length
()));
}
else
if
((
index
=
a
du
serName
.
indexOf
(
"@"
))
>
0
)
{
map
.
put
(
"userName"
,
a
du
serName
.
substring
(
0
,
index
));
map
.
put
(
"domain"
,
a
du
serName
.
substring
(
index
+
1
));
if
((
index
=
a
ctiveDirectoryU
serName
.
indexOf
(
"\\"
))
>
0
)
{
map
.
put
(
"domain"
,
a
ctiveDirectoryU
serName
.
substring
(
0
,
index
));
map
.
put
(
"userName"
,
a
ctiveDirectoryUserName
.
substring
(
index
+
1
,
activeDirectoryU
serName
.
length
()));
}
else
if
((
index
=
a
ctiveDirectoryU
serName
.
indexOf
(
"@"
))
>
0
)
{
map
.
put
(
"userName"
,
a
ctiveDirectoryU
serName
.
substring
(
0
,
index
));
map
.
put
(
"domain"
,
a
ctiveDirectoryU
serName
.
substring
(
index
+
1
));
}
else
{
map
.
put
(
"userName"
,
a
du
serName
);
map
.
put
(
"userName"
,
a
ctiveDirectoryU
serName
);
}
return
map
;
}
...
...
@@ -465,16 +431,16 @@ public final class StringUtils {
* @param str
* @return
*/
public
static
String
takeoffDomain
(
String
a
du
serName
)
{
Map
<
String
,
String
>
map
=
aduserName2Map
(
a
du
serName
);
public
static
String
takeoffDomain
(
String
a
ctiveDirectoryU
serName
)
{
Map
<
String
,
String
>
map
=
aduserName2Map
(
a
ctiveDirectoryU
serName
);
if
(
BeanUtil
.
isNotNull
(
map
))
{
return
map
.
get
(
"userName"
);
}
return
null
;
}
public
static
String
getA
dDomin
(
String
adu
serName
)
{
Map
<
String
,
String
>
map
=
aduserName2Map
(
a
du
serName
);
public
static
String
getA
ctiveDirectoryDomin
(
String
activeDirectoryU
serName
)
{
Map
<
String
,
String
>
map
=
aduserName2Map
(
a
ctiveDirectoryU
serName
);
if
(
BeanUtil
.
isNotNull
(
map
))
{
return
map
.
get
(
"domain"
);
}
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/RegistrationController.java
浏览文件 @
254ab67b
...
...
@@ -182,7 +182,7 @@ public class RegistrationController {
@RequestMapping
(
value
={
"/registeron"
})
@ResponseBody
public
Message
registeron
(
UserInfo
userInfo
,
@RequestParam
String
emailMobile
)
throws
ServletException
,
IOException
{
if
(
StringUtils
.
is
NullOrBlank
(
emailMobile
))
{
if
(
StringUtils
.
is
Empty
(
emailMobile
))
{
return
new
Message
(
WebContext
.
getI18nValue
(
"register.emailMobile.error"
),
"1"
);
}
if
(
StringUtils
.
isValidEmail
(
emailMobile
))
{
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/SafeController.java
浏览文件 @
254ab67b
...
...
@@ -135,7 +135,7 @@ public class SafeController {
_logger
.
debug
(
"App Login Password : "
+
userInfo
.
getAppLoginPassword
());
_logger
.
debug
(
"App Login new Password : "
+
ReciprocalUtils
.
encode
(
newPassword
));
if
(
newPassword
.
equals
(
confirmPassword
)){
if
(
StringUtils
.
is
NullOrBlank
(
userInfo
.
getAppLoginPassword
())||
userInfo
.
getAppLoginPassword
().
equals
(
ReciprocalUtils
.
encode
(
oldPassword
))){
if
(
StringUtils
.
is
Empty
(
userInfo
.
getAppLoginPassword
())||
userInfo
.
getAppLoginPassword
().
equals
(
ReciprocalUtils
.
encode
(
oldPassword
))){
userInfo
.
setAppLoginPassword
(
ReciprocalUtils
.
encode
(
newPassword
));
boolean
change
=
userInfoService
.
changeAppLoginPassword
(
userInfo
);
_logger
.
debug
(
""
+
change
);
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/filter/SingleSignOnFilter.java
浏览文件 @
254ab67b
...
...
@@ -50,7 +50,7 @@ public class SingleSignOnFilter implements Filter {
// 浠巗ession涓幏鍙栧瓨鏀剧殑appid
String
appId
=
(
String
)
session
.
getAttribute
(
WebConstants
.
SINGLE_SIGN_ON_APP_ID
);
// 鑾峰彇鏈�鍚庝竴涓�"/"鐨勬暟鎹綔涓篴ppid锛屼繚瀛樺湪session涓�
if
(
StringUtils
.
is
NullOrBlank
(
appId
))
{
if
(
StringUtils
.
is
Empty
(
appId
))
{
String
uir
=
httpServletRequest
.
getRequestURI
();
session
.
setAttribute
(
WebConstants
.
SINGLE_SIGN_ON_APP_ID
,
uir
.
substring
(
uir
.
lastIndexOf
(
"/"
)
+
1
));
...
...
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/UserInfoController.java
浏览文件 @
254ab67b
...
...
@@ -292,7 +292,7 @@ public class UserInfoController {
binder
.
registerCustomEditor
(
String
.
class
,
new
PropertyEditorSupport
()
{
@Override
public
void
setAsText
(
String
value
)
{
if
(
StringUtils
.
is
NullOrBlank
(
value
)){
if
(
StringUtils
.
is
Empty
(
value
)){
setValue
(
null
);
}
else
{
setValue
(
value
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录