Skip to content

Commit

Permalink
[CHORE] 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaeAg committed Dec 6, 2024
1 parent 4ebc22a commit 7518836
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/org/websoso/WSSServer/service/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.websoso.WSSServer.domain.Avatar;
import org.websoso.WSSServer.domain.Genre;
import org.websoso.WSSServer.domain.GenrePreference;
import org.websoso.WSSServer.domain.RefreshToken;
import org.websoso.WSSServer.domain.User;
import org.websoso.WSSServer.domain.WithdrawalReason;
import org.websoso.WSSServer.domain.common.DiscordWebhookMessage;
Expand Down Expand Up @@ -87,6 +88,12 @@ public LoginResponse login(Long userId) {

UserAuthentication userAuthentication = new UserAuthentication(user.getUserId(), null, null);
String token = jwtProvider.generateAccessToken(userAuthentication);
String refreshToken = jwtProvider.generateRefreshToken(userAuthentication);

RefreshToken redisRefreshToken = new RefreshToken(refreshToken, user.getUserId());
refreshTokenRepository.save(redisRefreshToken);

System.out.print(refreshToken);

return LoginResponse.of(token);
}
Expand Down

0 comments on commit 7518836

Please sign in to comment.