|
|
@ -2,7 +2,6 @@ package com.daqing.financial.gateway.config; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.daqing.framework.util.JwtUtils; |
|
|
|
import com.daqing.framework.util.JwtUtils; |
|
|
|
import com.daqing.framework.util.RedisUtil; |
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.cloud.gateway.filter.GatewayFilterChain; |
|
|
|
import org.springframework.cloud.gateway.filter.GatewayFilterChain; |
|
|
@ -85,10 +84,10 @@ public class ApiGlobalFilter implements GlobalFilter, Ordered { |
|
|
|
* @return userPhone |
|
|
|
* @return userPhone |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private Boolean verifyJWT(String token){ |
|
|
|
private Boolean verifyJWT(String token){ |
|
|
|
String id = RedisUtil.get("dq:token:"+token); |
|
|
|
/*String id = RedisUtil.get("dq:token:"+token); |
|
|
|
if(id == null || "".equals(id)){ |
|
|
|
if(id == null || "".equals(id)){ |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
}*/ |
|
|
|
return JwtUtils.validateJWT(token); |
|
|
|
return JwtUtils.validateJWT(token); |
|
|
|
//return Long.parseLong(id);
|
|
|
|
//return Long.parseLong(id);
|
|
|
|
} |
|
|
|
} |
|
|
|