Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
浙江兰德纵横网络技术股份有限公司
o2oa
提交
2d199613
o2oa
项目概览
浙江兰德纵横网络技术股份有限公司
/
o2oa
通知
339
Star
10
Fork
6
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2d199613
编写于
1月 25, 2021
作者:
O
o2sword
2
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
补充微信、钉钉等单点审计日志
上级
4289c97a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
19 addition
and
5 deletion
+19
-5
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/dingding/ActionLogin.java
...n/assemble/authentication/jaxrs/dingding/ActionLogin.java
+8
-3
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/qiyeweixin/ActionGetLogin.java
...emble/authentication/jaxrs/qiyeweixin/ActionGetLogin.java
+4
-1
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/welink/ActionLogin.java
...ion/assemble/authentication/jaxrs/welink/ActionLogin.java
+3
-0
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/zhengwudingding/ActionLogin.java
...ble/authentication/jaxrs/zhengwudingding/ActionLogin.java
+4
-1
未找到文件。
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/dingding/ActionLogin.java
浏览文件 @
2d199613
...
...
@@ -6,10 +6,11 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.x.base.core.project.logger.Audit
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
org.apache.commons.lang3.StringUtils
;
import
com.google.gson.JsonElement
;
import
com.google.gson.JsonObject
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.JpaObject
;
...
...
@@ -25,10 +26,13 @@ import com.x.organization.core.entity.Person;
class
ActionLogin
extends
BaseAction
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionLogin
.
class
);
ActionResult
<
Wo
>
execute
(
HttpServletRequest
request
,
HttpServletResponse
response
,
EffectivePerson
effectivePerson
,
String
code
)
throws
Exception
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Audit
audit
=
logger
.
audit
(
effectivePerson
);
String
url
=
"https://oapi.dingtalk.com/user/getuserinfo?access_token="
+
Config
.
dingding
().
corpAccessToken
()
+
"&code="
+
code
;
String
value
=
this
.
get
(
url
);
...
...
@@ -66,6 +70,7 @@ class ActionLogin extends BaseAction {
wo
.
setToken
(
effective
.
getToken
());
HttpToken
httpToken
=
new
HttpToken
();
httpToken
.
setToken
(
request
,
response
,
effective
);
audit
.
log
(
person
.
getDistinguishedName
(),
"登录"
);
result
.
setData
(
wo
);
}
return
result
;
...
...
@@ -147,4 +152,4 @@ class ActionLogin extends BaseAction {
}
}
}
\ No newline at end of file
}
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/qiyeweixin/ActionGetLogin.java
浏览文件 @
2d199613
...
...
@@ -6,6 +6,7 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.x.base.core.project.logger.Audit
;
import
org.apache.commons.lang3.StringUtils
;
import
com.google.gson.Gson
;
...
...
@@ -37,6 +38,7 @@ class ActionGetLogin extends BaseAction {
String
code
)
throws
Exception
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Audit
audit
=
logger
.
audit
(
effectivePerson
);
if
(
StringUtils
.
isEmpty
(
code
))
{
throw
new
ExceptionCodeEmpty
();
}
...
...
@@ -65,6 +67,7 @@ class ActionGetLogin extends BaseAction {
wo
.
setToken
(
effective
.
getToken
());
HttpToken
httpToken
=
new
HttpToken
();
httpToken
.
setToken
(
request
,
response
,
effective
);
audit
.
log
(
person
.
getDistinguishedName
(),
"登录"
);
result
.
setData
(
wo
);
}
return
result
;
...
...
@@ -102,4 +105,4 @@ class ActionGetLogin extends BaseAction {
}
}
}
\ No newline at end of file
}
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/welink/ActionLogin.java
浏览文件 @
2d199613
...
...
@@ -14,6 +14,7 @@ import com.x.base.core.project.http.ActionResult;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.http.HttpToken
;
import
com.x.base.core.project.http.TokenType
;
import
com.x.base.core.project.logger.Audit
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.organization.assemble.authentication.Business
;
...
...
@@ -39,6 +40,7 @@ public class ActionLogin extends BaseAction {
String
code
)
throws
Exception
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Audit
audit
=
logger
.
audit
(
effectivePerson
);
String
url
=
"https://open.welink.huaweicloud.com/api/auth/v2/userid?code="
+
code
;
logger
.
info
(
url
);
List
<
NameValuePair
>
heads
=
new
ArrayList
<>();
...
...
@@ -63,6 +65,7 @@ public class ActionLogin extends BaseAction {
wo
.
setToken
(
effective
.
getToken
());
HttpToken
httpToken
=
new
HttpToken
();
httpToken
.
setToken
(
request
,
response
,
effective
);
audit
.
log
(
person
.
getDistinguishedName
(),
"登录"
);
result
.
setData
(
wo
);
}
return
result
;
...
...
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/zhengwudingding/ActionLogin.java
浏览文件 @
2d199613
...
...
@@ -24,6 +24,7 @@ import com.x.base.core.project.http.ActionResult;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.http.HttpToken
;
import
com.x.base.core.project.http.TokenType
;
import
com.x.base.core.project.logger.Audit
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.organization.assemble.authentication.Business
;
...
...
@@ -38,6 +39,7 @@ class ActionLogin extends BaseAction {
String
code
)
throws
Exception
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Audit
audit
=
logger
.
audit
(
effectivePerson
);
logger
.
debug
(
"receive:{}"
,
code
);
String
dingUserId
=
this
.
getDingUserId
(
code
);
String
userId
=
this
.
getUserIdByDingUserId
(
dingUserId
);
...
...
@@ -54,6 +56,7 @@ class ActionLogin extends BaseAction {
wo
.
setToken
(
effective
.
getToken
());
HttpToken
httpToken
=
new
HttpToken
();
httpToken
.
setToken
(
request
,
response
,
effective
);
audit
.
log
(
person
.
getDistinguishedName
(),
"登录"
);
result
.
setData
(
wo
);
}
return
result
;
...
...
@@ -191,4 +194,4 @@ class ActionLogin extends BaseAction {
}
}
}
\ No newline at end of file
}
liyi_hz2008
@liyi_hz2008
mentioned in commit
6df97457
·
4月 01, 2021
mentioned in commit
6df97457
mentioned in commit 6df97457292ee8a2ba06f30f9da2a69fb2822718
开关提交列表
liyi_hz2008
@liyi_hz2008
mentioned in commit
3124a649
·
7月 17, 2021
mentioned in commit
3124a649
mentioned in commit 3124a649f50b4ee77967265ab645b5dc46fb9f80
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录