본인인증 : block 된 사용자 정보로 본인인증을 시도하는 경우

- 본인인증 시도 계정 탈퇴 처리
This commit is contained in:
Klaus 2023-11-09 20:06:56 +09:00
parent bfedc448af
commit ad295564de
2 changed files with 2 additions and 5 deletions

View File

@ -23,6 +23,7 @@ class AuthController(private val service: AuthService) {
if (service.isBlockAuth(authenticateData)) {
service.signOut(member.id!!)
throw SodaException("운영정책을 위반하여 이용을 제한합니다.")
} else {
service.authenticate(authenticateData, member.id!!)
}

View File

@ -27,8 +27,6 @@ class AuthService(
@Value("\${bootpay.private-key}")
private val bootpayPrivateKey: String
) {
private val blockMessage = "운영정책을 위반하여 이용을 제한합니다."
fun certificate(request: AuthVerifyRequest, memberId: Long): AuthVerifyCertificate {
val bootpay = Bootpay(bootpayApplicationId, bootpayPrivateKey)
@ -66,13 +64,11 @@ class AuthService(
val member = memberRepository.findByIdOrNull(memberId) ?: throw SodaException("로그인 정보를 확인해주세요.")
member.isActive = false
val signOut = SignOut(reason = blockMessage)
val signOut = SignOut(reason = "운영정책을 위반하여 이용을 제한합니다.")
signOut.member = member
signOutRepository.save(signOut)
memberService.logoutAll(memberId = memberId)
throw SodaException("운영정책을 위반하여 이용을 제한합니다.")
}
@Transactional