修正从cookie取token的错误

This commit is contained in:
ajaxfan
2021-04-23 15:51:33 +08:00
parent cca27674b9
commit a1b132234e
2 changed files with 2 additions and 7 deletions

View File

@ -88,7 +88,7 @@ public class FeignConfig implements RequestInterceptor {
Optional.ofNullable(attributes.getRequest().getCookies()).ifPresent(cookies -> {
Stream.of(cookies).filter(item -> StringUtils.equals(item.getName(), COOKIE_TOKEN_CODE)).findFirst()
.ifPresent(token -> {
log.info("FeignConfig extract token {} from cookie", token);
log.info("FeignConfig extract token {} from cookie", token.getValue());
template.header(AUTHORIZATION_HEADER,
String.format("%s%s", TOKEN_PREFIX, token.getValue()));
});