diff --git a/src/auth-service/src/main/java/org/palette/easelauthservice/EaselAuthServiceApplication.java b/src/auth-service/src/main/java/org/palette/easelauthservice/EaselAuthServiceApplication.java index 415b6cad..06b01b55 100644 --- a/src/auth-service/src/main/java/org/palette/easelauthservice/EaselAuthServiceApplication.java +++ b/src/auth-service/src/main/java/org/palette/easelauthservice/EaselAuthServiceApplication.java @@ -1,6 +1,7 @@ package org.palette.easelauthservice; import org.palette.aop.EaselAuthenticationContext; +import org.palette.aop.LoggingAspect; import org.palette.aop.PassportAspect; import org.palette.config.CommonModuleConfig; import org.springframework.boot.SpringApplication; @@ -10,7 +11,8 @@ @Import({ CommonModuleConfig.class, EaselAuthenticationContext.class, - PassportAspect.class + PassportAspect.class, + LoggingAspect.class }) @SpringBootApplication public class EaselAuthServiceApplication { diff --git a/src/auth-service/src/main/java/org/palette/easelauthservice/usecase/AuthUsecase.java b/src/auth-service/src/main/java/org/palette/easelauthservice/usecase/AuthUsecase.java index 6104b623..97da8d2f 100644 --- a/src/auth-service/src/main/java/org/palette/easelauthservice/usecase/AuthUsecase.java +++ b/src/auth-service/src/main/java/org/palette/easelauthservice/usecase/AuthUsecase.java @@ -1,6 +1,7 @@ package org.palette.easelauthservice.usecase; import lombok.RequiredArgsConstructor; +import org.palette.aop.InternalErrorLogging; import org.palette.easelauthservice.component.jwt.JwtAgent; import org.palette.easelauthservice.component.jwt.component.JwtPair; import org.palette.easelauthservice.component.mailsender.EmailAuthMailSender; @@ -28,6 +29,7 @@ public class AuthUsecase extends GAuthServiceGrpc.GAuthServiceImplBase { private final JwtAgent jwtAgent; private final PassportGenerator passportGenerator; + @InternalErrorLogging public void verifyEmail(SendEmailAuthRequest sendEmailAuthRequest) { String email = sendEmailAuthRequest.email(); EmailAuth emailAuth = redisEmailAuthService.loadByEmail(email); @@ -41,6 +43,7 @@ public void verifyEmail(SendEmailAuthRequest sendEmailAuthRequest) { redisEmailAuthService.update(emailAuth); } + @InternalErrorLogging public void resend(ResendEmailAuthRequest resendEmailAuthRequest) { String email = resendEmailAuthRequest.email(); EmailAuth emailAuth = redisEmailAuthService.loadByEmail(email); @@ -52,6 +55,7 @@ public void resend(ResendEmailAuthRequest resendEmailAuthRequest) { emailAuthMailSender.send(email, emailAuth.getAuthPayload()); } + @InternalErrorLogging public JwtPair login(LoginRequest loginRequest) { String email = loginRequest.email(); String password = loginRequest.password(); @@ -61,6 +65,7 @@ public JwtPair login(LoginRequest loginRequest) { ); } + @InternalErrorLogging public String validateJWT(String jwtPayload) { Long userId = jwtAgent.parseUserId(jwtPayload); GLoadUserInfoFromIdResponse gLoadUserInfoFromIdResponse = grpcUserClient.loadById(userId);