Skip to content

Commit 63c3814

Browse files
committed
feat:积木报表 token 校验
1 parent 025ae17 commit 63c3814

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

quick-boot-jimureport/quick-boot-jimureport-start/src/main/java/com/quick/jimureport/config/JimuReportTokenService.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ public class JimuReportTokenService implements JmReportTokenServiceI {
3131
*/
3232
@Override
3333
public String getToken(HttpServletRequest request) {
34-
return request.getHeader(CommonConstant.X_ACCESS_TOKEN);
34+
String token = request.getParameter("token");
35+
if (token == null) {
36+
token = request.getHeader(CommonConstant.X_ACCESS_TOKEN);
37+
}
38+
return token;
3539
}
3640

3741
/**
@@ -78,7 +82,7 @@ public String[] getRoles(String token) {
7882
*/
7983
@Override
8084
public Boolean verifyToken(String token) {
81-
return true;
85+
return StpUtil.getLoginIdByToken(token)==null?false:true;
8286
}
8387

8488
/**

0 commit comments

Comments
 (0)