Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yujianwangzivayy
MaxKey
提交
b483af3f
MaxKey
项目概览
yujianwangzivayy
/
MaxKey
与 Fork 源项目一致
Fork自
MaxKey单点登录官方(MaxKeyTop) / MaxKey
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b483af3f
编写于
12月 19, 2021
作者:
M
MaxKey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
PasswordReciprocal
上级
6b6dafc7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
2 deletion
+14
-2
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/service/SocialSignOnProviderService.java
...ort/socialsignon/service/SocialSignOnProviderService.java
+4
-1
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/SocialsProviderController.java
.../org/maxkey/web/contorller/SocialsProviderController.java
+6
-1
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/SynchronizersController.java
...va/org/maxkey/web/contorller/SynchronizersController.java
+4
-0
未找到文件。
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/service/SocialSignOnProviderService.java
浏览文件 @
b483af3f
...
...
@@ -24,6 +24,7 @@ import java.util.HashMap;
import
java.util.List
;
import
org.maxkey.configuration.ApplicationConfig
;
import
org.maxkey.crypto.password.PasswordReciprocal
;
import
org.maxkey.entity.SocialsProvider
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -194,7 +195,9 @@ public class SocialSignOnProviderService{
socialsProvider
.
setProviderName
(
rs
.
getString
(
"providername"
));
socialsProvider
.
setIcon
(
rs
.
getString
(
"icon"
));
socialsProvider
.
setClientId
(
rs
.
getString
(
"clientid"
));
socialsProvider
.
setClientSecret
(
rs
.
getString
(
"clientsecret"
));
String
clientSecret
=
rs
.
getString
(
"clientsecret"
);
clientSecret
=
PasswordReciprocal
.
getInstance
().
decoder
(
clientSecret
);
socialsProvider
.
setClientSecret
(
clientSecret
);
socialsProvider
.
setAgentId
(
rs
.
getString
(
"agentId"
));
socialsProvider
.
setHidden
(
rs
.
getString
(
"hidden"
));
socialsProvider
.
setSortIndex
(
rs
.
getInt
(
"sortindex"
));
...
...
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/SocialsProviderController.java
浏览文件 @
b483af3f
...
...
@@ -19,6 +19,7 @@ package org.maxkey.web.contorller;
import
org.apache.mybatis.jpa.persistence.JpaPageResults
;
import
org.maxkey.constants.ConstantsOperateMessage
;
import
org.maxkey.crypto.password.PasswordReciprocal
;
import
org.maxkey.entity.SocialsProvider
;
import
org.maxkey.persistence.service.SocialsProviderService
;
import
org.maxkey.web.WebContext
;
...
...
@@ -66,7 +67,9 @@ public class SocialsProviderController {
@RequestMapping
(
value
=
{
"/forwardUpdate/{id}"
})
public
ModelAndView
forwardUpdate
(
@PathVariable
(
"id"
)
String
id
)
{
ModelAndView
modelAndView
=
new
ModelAndView
(
"socialsprovider/socialsProviderUpdate"
);
modelAndView
.
addObject
(
"model"
,
socialsProviderService
.
get
(
id
));
SocialsProvider
socialsProvider
=
socialsProviderService
.
get
(
id
);
socialsProvider
.
setClientSecret
(
PasswordReciprocal
.
getInstance
().
decoder
(
socialsProvider
.
getClientSecret
()));
modelAndView
.
addObject
(
"model"
,
socialsProvider
);
return
modelAndView
;
}
...
...
@@ -75,6 +78,7 @@ public class SocialsProviderController {
public
Message
insert
(
@ModelAttribute
(
"socialsProvider"
)
SocialsProvider
socialsProvider
)
{
_logger
.
debug
(
"-Add :"
+
socialsProvider
);
socialsProvider
.
setInstId
(
WebContext
.
getUserInfo
().
getInstId
());
socialsProvider
.
setClientSecret
(
PasswordReciprocal
.
getInstance
().
encode
(
socialsProvider
.
getClientSecret
()));
if
(
socialsProviderService
.
insert
(
socialsProvider
))
{
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
INSERT_SUCCESS
),
MessageType
.
success
);
...
...
@@ -113,6 +117,7 @@ public class SocialsProviderController {
public
Message
update
(
@ModelAttribute
(
"socialsProvider"
)
SocialsProvider
socialsProvider
)
{
_logger
.
debug
(
"-update socialsProvider :"
+
socialsProvider
);
socialsProvider
.
setInstId
(
WebContext
.
getUserInfo
().
getInstId
());
socialsProvider
.
setClientSecret
(
PasswordReciprocal
.
getInstance
().
encode
(
socialsProvider
.
getClientSecret
()));
if
(
socialsProviderService
.
update
(
socialsProvider
))
{
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
UPDATE_SUCCESS
),
MessageType
.
success
);
...
...
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/SynchronizersController.java
浏览文件 @
b483af3f
...
...
@@ -21,6 +21,7 @@ import java.util.List;
import
org.apache.mybatis.jpa.persistence.JpaPageResults
;
import
org.maxkey.constants.ConstantsOperateMessage
;
import
org.maxkey.crypto.password.PasswordReciprocal
;
import
org.maxkey.entity.Synchronizers
;
import
org.maxkey.persistence.service.SynchronizersService
;
import
org.maxkey.synchronizer.ISynchronizerService
;
...
...
@@ -72,6 +73,7 @@ public class SynchronizersController {
public
ModelAndView
forwardUpdate
(
@PathVariable
(
"id"
)
String
id
)
{
ModelAndView
modelAndView
=
new
ModelAndView
(
"synchronizers/synchronizerUpdate"
);
Synchronizers
synchronizers
=
synchronizersService
.
get
(
id
);
synchronizers
.
setCredentials
(
PasswordReciprocal
.
getInstance
().
decoder
(
synchronizers
.
getCredentials
()));
modelAndView
.
addObject
(
"model"
,
synchronizers
);
return
modelAndView
;
}
...
...
@@ -88,6 +90,7 @@ public class SynchronizersController {
public
Message
update
(
@ModelAttribute
(
"synchronizers"
)
Synchronizers
synchronizers
)
{
_logger
.
debug
(
"-update synchronizers :"
+
synchronizers
);
synchronizers
.
setInstId
(
WebContext
.
getUserInfo
().
getInstId
());
synchronizers
.
setCredentials
(
PasswordReciprocal
.
getInstance
().
encode
(
synchronizers
.
getCredentials
()));
if
(
synchronizersService
.
update
(
synchronizers
))
{
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
UPDATE_SUCCESS
),
MessageType
.
success
);
...
...
@@ -111,6 +114,7 @@ public class SynchronizersController {
try
{
for
(
String
sysId
:
ids
)
{
Synchronizers
synchronizer
=
synchronizersService
.
get
(
sysId
);
synchronizer
.
setCredentials
(
PasswordReciprocal
.
getInstance
().
decoder
(
synchronizer
.
getCredentials
()));
_logger
.
debug
(
"synchronizer "
+
synchronizer
);
ISynchronizerService
synchronizerService
=
WebContext
.
getBean
(
synchronizer
.
getService
(),
ISynchronizerService
.
class
);
synchronizerService
.
setSynchronizer
(
synchronizer
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录