userid 타입 변경
This commit is contained in:
@@ -70,7 +70,7 @@ public class LoginController {
|
||||
UserInfoInqyResDTO userInfoInqyResponse = loginService.getUserInfo(userInfoInqyRequest);
|
||||
System.out.println("사용자정보 :: " + userInfoInqyResponse.toString());
|
||||
|
||||
ResponseCookie cookie = loginService.createJwtCookie(Long.parseLong(userInfoInqyResponse.getId()));
|
||||
ResponseCookie cookie = loginService.createJwtCookie(userInfoInqyResponse.getId());
|
||||
|
||||
Map<String, Object> response = new java.util.HashMap<>();
|
||||
response.put("success", true);
|
||||
@@ -89,7 +89,7 @@ public class LoginController {
|
||||
* @return 로그인 결과 및 JWT 토큰
|
||||
*/
|
||||
@GetMapping("/oauth/get-jwt-token")
|
||||
public ResponseEntity<Map<String, String>> getJwtToken(@RequestParam Long userId) {
|
||||
public ResponseEntity<Map<String, String>> getJwtToken(@RequestParam String userId) {
|
||||
ResponseCookie cookie = loginService.createJwtCookie(userId);
|
||||
Map<String, String> response = new java.util.HashMap<>();
|
||||
response.put("token", cookie.toString());
|
||||
|
||||
@@ -76,7 +76,7 @@ public class LoginService {
|
||||
* @param userId 사용자 ID
|
||||
* @return ResponseCookie JWT 토큰이 포함된 쿠키
|
||||
*/
|
||||
public ResponseCookie createJwtCookie(Long userId) {
|
||||
public ResponseCookie createJwtCookie(String userId) {
|
||||
String jwt = jwtProvider.createJwtToken(userId);
|
||||
return ResponseCookie.from("accessToken", jwt)
|
||||
.httpOnly(true)
|
||||
|
||||
Reference in New Issue
Block a user