Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yujianwangzivayy
MaxKey
提交
506a2200
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,发现更多精彩内容 >>
提交
506a2200
编写于
1月 26, 2022
作者:
M
MaxKey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
log ldap attribute values
上级
d2b6f8a8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
39 addition
and
8 deletion
+39
-8
maxkey-core/src/main/java/org/maxkey/persistence/ldap/LdapUtils.java
.../src/main/java/org/maxkey/persistence/ldap/LdapUtils.java
+23
-4
maxkey-synchronizers/maxkey-synchronizer-activedirectory/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryOrganizationService.java
...r/activedirectory/ActiveDirectoryOrganizationService.java
+4
-1
maxkey-synchronizers/maxkey-synchronizer-activedirectory/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryUsersService.java
...hronizer/activedirectory/ActiveDirectoryUsersService.java
+4
-1
maxkey-synchronizers/maxkey-synchronizer-ldap/src/main/java/org/maxkey/synchronizer/ldap/LdapOrganizationService.java
...org/maxkey/synchronizer/ldap/LdapOrganizationService.java
+4
-1
maxkey-synchronizers/maxkey-synchronizer-ldap/src/main/java/org/maxkey/synchronizer/ldap/LdapUsersService.java
...n/java/org/maxkey/synchronizer/ldap/LdapUsersService.java
+4
-1
未找到文件。
maxkey-core/src/main/java/org/maxkey/persistence/ldap/LdapUtils.java
浏览文件 @
506a2200
...
...
@@ -291,14 +291,14 @@ public class LdapUtils {
}
public
static
String
getAttrStringValue
(
Attributes
attrs
,
String
elem
)
{
String
value
=
""
;
StringBuffer
values
=
new
StringBuffer
(
""
)
;
try
{
if
(
attrs
.
get
(
elem
)
!=
null
)
{
for
(
int
i
=
0
;
i
<
attrs
.
get
(
elem
).
size
();
i
++)
{
if
(
i
==
0
)
{
value
+=
attrs
.
get
(
elem
).
get
(
i
).
toString
(
);
value
s
.
append
(
attrs
.
get
(
elem
).
get
(
i
).
toString
()
);
}
else
{
value
+=
","
+
attrs
.
get
(
elem
).
get
(
i
).
toString
(
);
value
s
.
append
(
" , "
).
append
(
attrs
.
get
(
elem
).
get
(
i
).
toString
()
);
}
}
}
...
...
@@ -306,7 +306,26 @@ public class LdapUtils {
e
.
printStackTrace
();
_logger
.
error
(
e
.
getMessage
());
}
return
value
;
return
values
.
toString
();
}
public
static
String
getAttrStringValue
(
Attribute
attr
)
{
StringBuffer
values
=
new
StringBuffer
(
""
);
try
{
if
(
attr
!=
null
)
{
for
(
int
i
=
0
;
i
<
attr
.
size
();
i
++)
{
if
(
i
==
0
)
{
values
.
append
(
attr
.
get
(
i
).
toString
());
}
else
{
values
.
append
(
" , "
).
append
(
attr
.
get
(
i
).
toString
());
}
}
}
}
catch
(
NamingException
e
)
{
e
.
printStackTrace
();
_logger
.
error
(
e
.
getMessage
());
}
return
values
.
toString
();
}
public
static
String
getAttributeStringValue
(
String
attribute
,
HashMap
<
String
,
Attribute
>
attributeMap
)
throws
NamingException
{
...
...
maxkey-synchronizers/maxkey-synchronizer-activedirectory/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryOrganizationService.java
浏览文件 @
506a2200
...
...
@@ -76,7 +76,10 @@ public class ActiveDirectoryOrganizationService extends AbstractSynchronizerSer
NamingEnumeration
<?
extends
Attribute
>
attrs
=
sr
.
getAttributes
().
getAll
();
while
(
null
!=
attrs
&&
attrs
.
hasMoreElements
())
{
Attribute
objAttrs
=
attrs
.
nextElement
();
_logger
.
trace
(
"attribute {} : {}"
,
objAttrs
.
getID
(),
objAttrs
.
get
());
_logger
.
trace
(
"attribute {} : {}"
,
objAttrs
.
getID
(),
ActiveDirectoryUtils
.
getAttrStringValue
(
objAttrs
)
);
attributeMap
.
put
(
objAttrs
.
getID
().
toLowerCase
(),
objAttrs
);
}
...
...
maxkey-synchronizers/maxkey-synchronizer-activedirectory/src/main/java/org/maxkey/synchronizer/activedirectory/ActiveDirectoryUsersService.java
浏览文件 @
506a2200
...
...
@@ -72,7 +72,10 @@ public class ActiveDirectoryUsersService extends AbstractSynchronizerService
NamingEnumeration
<?
extends
Attribute
>
attrs
=
sr
.
getAttributes
().
getAll
();
while
(
null
!=
attrs
&&
attrs
.
hasMoreElements
())
{
Attribute
objAttrs
=
attrs
.
nextElement
();
_logger
.
trace
(
"attribute {} : {}"
,
objAttrs
.
getID
(),
objAttrs
.
get
());
_logger
.
trace
(
"attribute {} : {}"
,
objAttrs
.
getID
(),
ActiveDirectoryUtils
.
getAttrStringValue
(
objAttrs
)
);
attributeMap
.
put
(
objAttrs
.
getID
().
toLowerCase
(),
objAttrs
);
}
...
...
maxkey-synchronizers/maxkey-synchronizer-ldap/src/main/java/org/maxkey/synchronizer/ldap/LdapOrganizationService.java
浏览文件 @
506a2200
...
...
@@ -71,7 +71,10 @@ public class LdapOrganizationService extends AbstractSynchronizerService implem
NamingEnumeration
<?
extends
Attribute
>
attrs
=
sr
.
getAttributes
().
getAll
();
while
(
null
!=
attrs
&&
attrs
.
hasMoreElements
())
{
Attribute
objAttrs
=
attrs
.
nextElement
();
_logger
.
trace
(
"attribute "
+
objAttrs
.
getID
()
+
" : "
+
objAttrs
.
get
());
_logger
.
trace
(
"attribute {} : {}"
,
objAttrs
.
getID
(),
LdapUtils
.
getAttrStringValue
(
objAttrs
)
);
attributeMap
.
put
(
objAttrs
.
getID
().
toLowerCase
(),
objAttrs
);
}
...
...
maxkey-synchronizers/maxkey-synchronizer-ldap/src/main/java/org/maxkey/synchronizer/ldap/LdapUsersService.java
浏览文件 @
506a2200
...
...
@@ -65,7 +65,10 @@ public class LdapUsersService extends AbstractSynchronizerService implements IS
NamingEnumeration
<?
extends
Attribute
>
attrs
=
sr
.
getAttributes
().
getAll
();
while
(
null
!=
attrs
&&
attrs
.
hasMoreElements
())
{
Attribute
objAttrs
=
attrs
.
nextElement
();
_logger
.
trace
(
"attribute "
+
objAttrs
.
getID
()
+
" , "
+
objAttrs
.
get
());
_logger
.
trace
(
"attribute {} : {}"
,
objAttrs
.
getID
(),
LdapUtils
.
getAttrStringValue
(
objAttrs
)
);
attributeMap
.
put
(
objAttrs
.
getID
(),
objAttrs
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录