|
|
|
|
@ -108,10 +108,21 @@ public class JwtUtils {
|
|
|
|
|
.build();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getCookieValueByName(HttpServletRequest request, String name) {
|
|
|
|
|
Cookie cookie = WebUtils.getCookie(request, name);
|
|
|
|
|
return cookie != null ? cookie.getValue() : null;
|
|
|
|
|
}
|
|
|
|
|
private String getCookieValueByName(HttpServletRequest request, String name) {
|
|
|
|
|
// 1. 쿠키에서 먼저 찾기
|
|
|
|
|
Cookie cookie = WebUtils.getCookie(request, name);
|
|
|
|
|
if (cookie != null) {
|
|
|
|
|
return cookie.getValue();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 2. 없으면 헤더에서 찾기
|
|
|
|
|
String headerValue = request.getHeader(name);
|
|
|
|
|
if (headerValue != null && !headerValue.isBlank()) {
|
|
|
|
|
return headerValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// private String getCookieValueByName(HttpServletRequest request, String name) {
|
|
|
|
|
// Cookie cookie = WebUtils.getCookie(request, name);
|
|
|
|
|
|