|
|
@ -42,11 +42,13 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt |
|
|
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws CustomerException { |
|
|
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws CustomerException { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.info(">>> 执行拦截器"); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
JSONObject data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+"shujutongbu"); |
|
|
|
JSONObject data =bladeRedis.get(CacheNames.LOCAL_SERVER_USER+"shujutongbu"); |
|
|
|
CustomHttpServletRequestWrapper wrappedRequest = new CustomHttpServletRequestWrapper(request); |
|
|
|
CustomHttpServletRequestWrapper wrappedRequest = new CustomHttpServletRequestWrapper(request); |
|
|
|
if(Objects.isNull(data)){ |
|
|
|
if(Objects.isNull(data)){ |
|
|
|
String url = "http://"+ LauncherConstant.loginAddr(AppConstant.DEV_CODE)+"/blade-auth/oauth/token"; |
|
|
|
String url = "http://"+ LauncherConstant.loginAddr(AppConstant.TEST_CODE)+"/blade-auth/oauth/token"; |
|
|
|
cn.hutool.http.HttpRequest urlRequest = HttpRequest.post(url); |
|
|
|
cn.hutool.http.HttpRequest urlRequest = HttpRequest.post(url); |
|
|
|
urlRequest.header("Authorization", "Basic c2FiZXI6c2FiZXJfc2VjcmV0"); |
|
|
|
urlRequest.header("Authorization", "Basic c2FiZXI6c2FiZXJfc2VjcmV0"); |
|
|
|
urlRequest.header("Tenant-Id", "627683"); |
|
|
|
urlRequest.header("Tenant-Id", "627683"); |
|
|
|