Skip to content

Commit

Permalink
Fix: 로깅추가
Browse files Browse the repository at this point in the history
  • Loading branch information
nohy6630 committed Nov 22, 2023
1 parent 4ba628b commit 6961b90
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.numberone.backend.properties.NaverProperties;
import com.numberone.backend.domain.token.util.JwtUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -24,6 +25,7 @@
@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)
@Slf4j
public class TokenService {
private final JwtUtil jwtUtil;
private final RestTemplate restTemplate;
Expand Down Expand Up @@ -73,8 +75,10 @@ public GetTokenResponse loginNaver(GetTokenRequest tokenRequest) {

@Transactional
public RefreshTokenResponse refresh(RefreshTokenRequest tokenRequest) {
if (!jwtUtil.isValid(tokenRequest.getToken()))
if (!jwtUtil.isValid(tokenRequest.getToken())) {
log.info("refreashToken: {}", tokenRequest.getToken());
throw new NotFoundRefreshTokenException();
}
Token token = tokenRepository.findByRefreshToken(tokenRequest.getToken())
.orElseThrow(NotFoundRefreshTokenException::new);
String email = jwtUtil.getEmail(tokenRequest.getToken());
Expand Down

0 comments on commit 6961b90

Please sign in to comment.