[코드 정리] CreateMemberResponseDto에서 MemberRole 필드 제거 및 JwtTokenValidationFilter에서 역할 관련 코드 삭제

This commit is contained in:
2025-08-27 16:33:18 +09:00
parent b0398fccee
commit fa1df19f64
2 changed files with 2 additions and 6 deletions

View File

@@ -1,6 +1,5 @@
package com.bio.bio_backend.domain.base.member.dto;
import com.bio.bio_backend.domain.base.member.enums.MemberRole;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -16,7 +15,6 @@ public class CreateMemberResponseDto {
private Long oid;
private String userId;
private MemberRole role;
private Boolean useFlag;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;

View File

@@ -88,17 +88,15 @@ public class JwtTokenValidationFilter extends OncePerRequestFilter {
// 모든 검증을 통과한 경우 토큰 갱신 진행
String username = jwtUtils.extractUsername(refreshToken);
String role = jwtUtils.extractRole(refreshToken);
// 새로운 Access Token 생성
String newAccessToken = jwtUtils.generateToken(username, role,
Long.parseLong(Objects.requireNonNull(env.getProperty("token.expiration_time_access"))));
String newAccessToken = jwtUtils.generateToken(username, Long.parseLong(Objects.requireNonNull(env.getProperty("token.expiration_time_access"))));
// 새로운 Access Token을 응답 헤더에 설정
response.setHeader("Authorization", "Bearer " + newAccessToken);
// Refresh Token 갱신
String newRefreshToken = jwtUtils.createRefreshToken(username, role, httpUtils.getClientIp());
String newRefreshToken = jwtUtils.createRefreshToken(username, httpUtils.getClientIp());
jwtUtils.setRefreshTokenCookie(response, newRefreshToken);
// 인증 정보 설정