提交 d7e914c6 编写于 作者: zlt2000's avatar zlt2000

注释token传递

上级 f937bdfd
......@@ -28,14 +28,14 @@ public class FeignInterceptorConfig {
.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
//传递access_token
String token = extractHeaderToken(request);
if (StrUtil.isNotEmpty(token)) {
//传递access_token,无网关隔离时需要传递
/*String token = extractHeaderToken(request);
if (StrUtil.isEmpty(token)) {
token = request.getParameter(CommonConstant.ACCESS_TOKEN);
}
if (StrUtil.isNotEmpty(token)) {
template.header(CommonConstant.TOKEN_HEADER, CommonConstant.BEARER_TYPE + " " + token);
}
}*/
//传递username
String username = request.getHeader(SecurityConstants.USER_HEADER);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册