注释token传递
This commit is contained in:
+4
-4
@@ -28,14 +28,14 @@ public class FeignInterceptorConfig {
|
|||||||
.getRequestAttributes();
|
.getRequestAttributes();
|
||||||
HttpServletRequest request = attributes.getRequest();
|
HttpServletRequest request = attributes.getRequest();
|
||||||
|
|
||||||
//传递access_token
|
//传递access_token,无网关隔离时需要传递
|
||||||
String token = extractHeaderToken(request);
|
/*String token = extractHeaderToken(request);
|
||||||
if (StrUtil.isNotEmpty(token)) {
|
if (StrUtil.isEmpty(token)) {
|
||||||
token = request.getParameter(CommonConstant.ACCESS_TOKEN);
|
token = request.getParameter(CommonConstant.ACCESS_TOKEN);
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotEmpty(token)) {
|
if (StrUtil.isNotEmpty(token)) {
|
||||||
template.header(CommonConstant.TOKEN_HEADER, CommonConstant.BEARER_TYPE + " " + token);
|
template.header(CommonConstant.TOKEN_HEADER, CommonConstant.BEARER_TYPE + " " + token);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//传递username
|
//传递username
|
||||||
String username = request.getHeader(SecurityConstants.USER_HEADER);
|
String username = request.getHeader(SecurityConstants.USER_HEADER);
|
||||||
|
|||||||
Reference in New Issue
Block a user