Skip to content

Commit

Permalink
[fix] unauthorizedException 에러 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryeolee committed Oct 27, 2023
1 parent 99cd678 commit 885b27b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 42 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
package modernfarmer.server.farmususer.user.service;

import lombok.extern.slf4j.Slf4j;
import modernfarmer.server.farmususer.global.exception.unauthorized.TokenExpiredException;
import modernfarmer.server.farmususer.user.dto.response.GoogleUserResponseDto;
import modernfarmer.server.farmususer.user.dto.response.KakaoUserResponseDto;
import modernfarmer.server.farmususer.user.dto.response.ResponseDto;
import modernfarmer.server.farmususer.user.dto.response.TokenResponseDto;
import modernfarmer.server.farmususer.user.entity.User;
import modernfarmer.server.farmususer.user.repository.UserRepository;
import modernfarmer.server.farmususer.user.util.JwtTokenProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package modernfarmer.server.farmususer.user.service;

import modernfarmer.server.farmususer.global.exception.unauthorized.TokenExpiredException;
import modernfarmer.server.farmususer.user.dto.response.ResponseDto;
import modernfarmer.server.farmususer.user.dto.response.TokenResponseDto;
import modernfarmer.server.farmususer.user.repository.UserRepository;
Expand Down Expand Up @@ -43,19 +42,6 @@ public ResponseDto logout(Long userId) {
public TokenResponseDto reissueToken(String refreshToken, Long userId) {
TokenResponseDto reissueTokenResponse;

if(!jwtTokenProvider.validateRefreshToken(refreshToken)){

// reissueTokenResponse = TokenResponseDto.builder()
// .code(417)
// .message("재로그인하시오")
// .build();


new TokenExpiredException();

// return reissueTokenResponse;
}

String redisRefreshToken = redisTemplate.opsForValue().get(userId.toString());

if(redisRefreshToken.equals(refreshToken)){
Expand Down

0 comments on commit 885b27b

Please sign in to comment.