-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #436 from Namo-log/feat/434
[Feat/434]
- Loading branch information
Showing
5 changed files
with
44 additions
and
3 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
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
26 changes: 26 additions & 0 deletions
26
...main/java/com/namo/spring/application/external/global/config/security/MemberSecurity.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,26 @@ | ||
package com.namo.spring.application.external.global.config.security; | ||
|
||
import org.springframework.stereotype.Component; | ||
import org.springframework.security.core.userdetails.UsernameNotFoundException; | ||
|
||
import com.namo.spring.application.external.api.user.service.MemberManageService; | ||
import com.namo.spring.db.mysql.domains.user.entity.Member; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@Component("memberSecurity") | ||
@RequiredArgsConstructor | ||
public class MemberSecurity { | ||
|
||
private final MemberManageService memberManageService; | ||
|
||
/** | ||
* 주어진 userId에 해당하는 사용자가 회원가입을 완료했는지 검사합니다. | ||
* @param userId SecurityUserDetails에서 가져온 사용자 ID | ||
* @return 회원가입이 완료되어 있으면 true, 아니면 false | ||
*/ | ||
public boolean hasCompletedSignUp(Long userId) { | ||
Member member = memberManageService.getMember(userId); | ||
return member.isSignUpComplete(); | ||
} | ||
} |
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