Skip to content

Commit

Permalink
#71 [feat] : 재발행 시 로그를 추가한다
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbang105 committed Oct 8, 2024
1 parent 147a81b commit ea1f10e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/side/onetime/service/TokenService.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package side.onetime.service;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import side.onetime.domain.RefreshToken;
Expand All @@ -12,6 +13,7 @@

import java.util.List;

@Slf4j
@Service
@RequiredArgsConstructor
public class TokenService {
Expand Down Expand Up @@ -48,6 +50,7 @@ public TokenDto.ReissueTokenResponse reissueToken(TokenDto.ReissueTokenRequest r
String newRefreshToken = jwtUtil.generateRefreshToken(userId, REFRESH_TOKEN_EXPIRATION_TIME);
refreshTokenRepository.save(new RefreshToken(userId, newRefreshToken));

log.info("토큰 재발행에 성공하였습니다.");
return TokenDto.ReissueTokenResponse.of(newAccessToken, newRefreshToken);
}
}

0 comments on commit ea1f10e

Please sign in to comment.