test #74

Merged
klaus merged 10 commits from test into main 2023-11-09 11:18:20 +00:00
2 changed files with 2 additions and 5 deletions
Showing only changes of commit ad295564de - Show all commits

View File

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

View File

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