-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: core-api모듈 -> core-api & core-domain분리 및 redis모듈 분리
- Loading branch information
Showing
124 changed files
with
1,758 additions
and
608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ subprojects { | |
} | ||
|
||
tasks.getByName("jar") { | ||
enabled = false | ||
enabled = true | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
jtoon-core/core-api/src/main/java/shop/jtoon/member/application/EmailService.java
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
jtoon-core/core-api/src/main/java/shop/jtoon/member/application/LoginService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package shop.jtoon.member.application; | ||
|
||
import org.springframework.stereotype.Service; | ||
|
||
import jakarta.servlet.http.HttpServletResponse; | ||
import lombok.RequiredArgsConstructor; | ||
import shop.jtoon.login.service.LoginDomainService; | ||
import shop.jtoon.member.domain.MyInfo; | ||
import shop.jtoon.member.dto.OAuthSignUpDto; | ||
import shop.jtoon.member.entity.Member; | ||
import shop.jtoon.member.request.LocalSignUpReq; | ||
import shop.jtoon.security.request.LoginReq; | ||
import shop.jtoon.security.service.JwtService; | ||
import shop.jtoon.security.service.RefreshTokenService; | ||
import shop.jtoon.security.util.TokenCookie; | ||
import shop.jtoon.util.SecurityConstant; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class LoginService { | ||
|
||
private final JwtService jwtProvider; | ||
private final RefreshTokenService refreshTokenServiceImpl; | ||
|
||
private final LoginDomainService loginService; | ||
|
||
public void signUp(LocalSignUpReq localSignUpReq) { | ||
loginService.signUp(localSignUpReq.toLoginInfo(), localSignUpReq.toUserInfo()); | ||
} | ||
|
||
public void loginMember(LoginReq loginReq, HttpServletResponse response) { | ||
loginService.login(loginReq.toLoginInfo()); | ||
|
||
String accessToken = jwtProvider.generateAccessToken(loginReq.email()); | ||
String refreshToken = jwtProvider.generateRefreshToken(); | ||
refreshTokenServiceImpl.saveRefreshToken(refreshToken, loginReq.email()); | ||
|
||
response.addCookie(TokenCookie.of(SecurityConstant.ACCESS_TOKEN_HEADER, accessToken)); | ||
response.addCookie(TokenCookie.of(SecurityConstant.REFRESH_TOKEN_HEADER, refreshToken)); | ||
} | ||
|
||
public Member generateOrGetSocialMember(OAuthSignUpDto oAuthSignUpDto) { | ||
return loginService.generateOrGetSocialMember(oAuthSignUpDto.toLoginInfo(), oAuthSignUpDto.toUserInfo()); | ||
} | ||
|
||
public MyInfo readMyInfo(String email) { | ||
return loginService.findMemberDtoByEmail(email); | ||
} | ||
} |
99 changes: 0 additions & 99 deletions
99
jtoon-core/core-api/src/main/java/shop/jtoon/member/application/MemberService.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.