Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lyf-beidou-cdp-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhoupeng
lyf-beidou-cdp-api
Commits
624cc144
Commit
624cc144
authored
Sep 14, 2023
by
zhoupeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交导入组织架构openapi接口
parent
873e3026
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
QiDianController.java
.../java/com/rome/order/api/controller/QiDianController.java
+3
-2
QiDianServiceImpl.java
...com/rome/order/domain/service/impl/QiDianServiceImpl.java
+8
-4
RemoteConstant.java
.../order/infrastructure/remote/constant/RemoteConstant.java
+1
-1
application.yml
src/main/resources/application.yml
+1
-1
No files found.
src/main/java/com/rome/order/api/controller/QiDianController.java
View file @
624cc144
...
...
@@ -75,7 +75,8 @@ public class QiDianController {
@GetMapping
(
"/logout"
)
@ApiOperation
(
value
=
"第三方sso用户退出登录"
)
public
String
logout
(
@RequestParam
(
"account"
)
String
account
)
{
return
qiDianService
.
logout
(
account
);
public
void
logout
(
@RequestParam
(
"account"
)
String
account
,
HttpServletResponse
response
)
throws
Exception
{
String
url
=
qiDianService
.
logout
(
account
);
response
.
sendRedirect
(
url
);
}
}
src/main/java/com/rome/order/domain/service/impl/QiDianServiceImpl.java
View file @
624cc144
...
...
@@ -482,12 +482,16 @@ public class QiDianServiceImpl implements QiDianService {
@Override
public
String
logout
(
String
account
)
{
try
{
String
url
=
String
.
format
(
beidouOpenapiUrl
+
RemoteConstant
.
SSO_LOGOUT_API_URL
,
account
);
Map
<
String
,
String
>
headers
=
HttpUtil
.
getOpenApiHeaderMap
(
corporationId
,
secret
);
String
timestamp
=
headers
.
get
(
"timestamp"
);
String
sign
=
headers
.
get
(
"sign"
);
String
signMd5
=
Md5Utils
.
string2MD5
(
sign
);
String
url
=
String
.
format
(
beidouOpenapiUrl
+
RemoteConstant
.
SSO_LOGOUT_API_URL
,
account
,
corporationId
,
timestamp
,
signMd5
);
log
.
info
(
"-----第三方sso用户退出登录------url:{},headers={}"
,
url
,
JSONObject
.
toJSONString
(
headers
));
String
result
=
HttpUtil
.
httpGet
(
url
,
headers
);
log
.
info
(
"-----第三方sso用户退出登录,result------:{}"
,
result
);
return
result
;
// String result = HttpUtil.httpGet(url, headers);
// String result = HttpUtil.httpGet(url);
log
.
info
(
"-----第三方sso用户退出登录,result------:{}"
,
url
);
return
url
;
}
catch
(
Exception
e
)
{
String
errorMsg
=
e
.
getMessage
();
log
.
error
(
"-----第三方sso登录报错了-------:{}"
,
errorMsg
);
...
...
src/main/java/com/rome/order/infrastructure/remote/constant/RemoteConstant.java
View file @
624cc144
...
...
@@ -75,7 +75,7 @@ public class RemoteConstant {
/**
* 第三方sso登录 第三方sso用户退出登录
*/
public
static
String
SSO_LOGOUT_API_URL
=
"/api/dataauth/authserver/logout/third/sso?account=%s"
;
public
static
String
SSO_LOGOUT_API_URL
=
"/api/dataauth/authserver/logout/third/sso?account=%s
&corporationId=%s×tamp=%s&sign=%s
"
;
/**
* UTF-8 字符集
...
...
src/main/resources/application.yml
View file @
624cc144
...
...
@@ -133,7 +133,7 @@ beidou:
#是否同步邮件
email
:
false
#登录完成后回调业务地址
consoleUrl
:
https://beidou.test.laiyifen.com
/console
consoleUrl
:
https://beidou.test.laiyifen.com
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment