File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/main/java/com/example/log4u/common/oauth2/jwt Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -126,15 +126,18 @@ private boolean validateTokenExpiration(
126126 }
127127
128128 private String extractRefreshTokenFromCookie (HttpServletRequest request ) {
129- // 리프레시 토큰 추출
130- String refresh = null ;
131129 Cookie [] cookies = request .getCookies ();
130+ if (cookies == null ) {
131+ return null ;
132+ }
133+
132134 for (Cookie cookie : cookies ) {
133- if (cookie .getName (). equals ( REFRESH_TOKEN )) {
134- refresh = cookie .getValue ();
135+ if (REFRESH_TOKEN . equals ( cookie .getName ())) {
136+ return cookie .getValue ();
135137 }
136138 }
137- return refresh ;
139+
140+ return null ;
138141 }
139142
140143 public void logout (HttpServletResponse response , String refresh ) throws IOException {
You can’t perform that action at this time.
0 commit comments