Skip to content

Commit

Permalink
refactor: LoginResponse 사용법 변경 in LoginFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchef1 committed May 24, 2024
1 parent e02ddcf commit 4bd6021
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sanbosillok.sanbosillokserver.api.auth.dto.CustomUserDetails;
import com.sanbosillok.sanbosillokserver.api.auth.dto.TokenResponse;
import com.sanbosillok.sanbosillokserver.api.auth.dto.LoginResponse;
import jakarta.servlet.FilterChain;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
Expand Down Expand Up @@ -57,7 +57,7 @@ protected void successfulAuthentication(HttpServletRequest request, HttpServletR
String token = jwtTokenProvider.createJwt(username, role);

response.setContentType("application/json");
response.getWriter().print(objectMapper.writeValueAsString(new TokenResponse(token)));
response.getWriter().print(objectMapper.writeValueAsString(new LoginResponse(token, role)));
}

@Override
Expand Down

0 comments on commit 4bd6021

Please sign in to comment.