Skip to content

Commit

Permalink
chore: 디버깅을 위한 로그를 추가한다.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlarltj committed Jul 25, 2024
1 parent 254fb6d commit 6484477
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
import com.moneymong.global.security.token.dto.Tokens;
import com.moneymong.global.security.token.service.TokenService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Slf4j
@RequiredArgsConstructor
public class UserFacadeService {
private final UserService userService;
Expand All @@ -25,7 +28,11 @@ public class UserFacadeService {
public LoginSuccessResponse login(LoginRequest loginRequest) {
OAuthUserDataResponse oAuthUserData = oAuthService.login(loginRequest);

log.info("Token = {}", loginRequest.getAccessToken());
log.info("Code = {}", loginRequest.getCode());

OAuthUserInfo oAuthUserInfo = OAuthUserInfo.from(oAuthUserData);
log.info("OAuthUserInfo = {}", oAuthUserInfo);

AuthUserInfo registerResult = userService.getOrRegister(oAuthUserInfo);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
@AllArgsConstructor
public class OAuthUserDataRequest {
private String accessToken;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class OAuthUserInfo {
private String provider;
private String oauthId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@

import static com.moneymong.global.exception.enums.ErrorCode.USER_NOT_FOUND;

import lombok.extern.slf4j.Slf4j;

@Service
@Slf4j
public class OAuthService {

private final Map<OAuthProvider, OAuthAuthenticationHandler> oAuthAuthenticationHandlers;
Expand All @@ -41,7 +44,7 @@ public OAuthUserDataResponse login(LoginRequest loginRequest) {
loginRequest.getCode(),
loginRequest.getName()
);

log.info("[OAuthService OAuthUserDataRequest] = {}", request);
return oAuthHandler.getOAuthUserData(request);
}

Expand Down

0 comments on commit 6484477

Please sign in to comment.