Browse Source

gateway对于公众号服务不该传递token的不进行token校验

dev
sunyuchao 5 years ago
parent
commit
2c03654630
  1. 3
      epmet-gateway/src/main/java/com/epmet/filter/UserTokenFilter.java

3
epmet-gateway/src/main/java/com/epmet/filter/UserTokenFilter.java

@ -16,7 +16,8 @@ public interface UserTokenFilter {
//是否过期 //是否过期
Claims claims = jwtTokenUtils.getClaimByToken(token); Claims claims = jwtTokenUtils.getClaimByToken(token);
if (claims == null || jwtTokenUtils.isTokenExpired(claims.getExpiration())) { if (claims == null || jwtTokenUtils.isTokenExpired(claims.getExpiration())) {
throw new RenException(EpmetErrorCode.ERR401.getCode()); // throw new RenException(EpmetErrorCode.ERR401.getCode());
return null;
} }
//获取用户ID //获取用户ID
String app = (String) claims.get("app"); String app = (String) claims.get("app");

Loading…
Cancel
Save