generated from pricelees/issue-pr-template
[#34] 회원 / 인증 도메인 재정의 #43
@ -45,16 +45,20 @@ class LoginHistoryService(
|
||||
) {
|
||||
log.info { "[LoginHistoryService.createHistory] 로그인 이력 저장 시작: id=${principalId}, type=${principalType}, success=${success}" }
|
||||
|
||||
LoginHistoryEntity(
|
||||
id = tsidFactory.next(),
|
||||
principalId = principalId,
|
||||
principalType = principalType,
|
||||
success = success,
|
||||
ipAddress = context.ipAddress,
|
||||
userAgent = context.userAgent,
|
||||
).also {
|
||||
loginHistoryRepository.save(it)
|
||||
log.info { "[LoginHistoryService.createHistory] 로그인 이력 저장 완료: principalId=${principalId}, historyId=${it.id}" }
|
||||
runCatching {
|
||||
LoginHistoryEntity(
|
||||
id = tsidFactory.next(),
|
||||
principalId = principalId,
|
||||
principalType = principalType,
|
||||
success = success,
|
||||
ipAddress = context.ipAddress,
|
||||
userAgent = context.userAgent,
|
||||
).also {
|
||||
loginHistoryRepository.save(it)
|
||||
log.info { "[LoginHistoryService.createHistory] 로그인 이력 저장 완료: principalId=${principalId}, historyId=${it.id}" }
|
||||
}
|
||||
}.onFailure {
|
||||
log.warn { "[LoginHistoryService] 로그인 이력 저장 중 예외 발생: message=${it.message} id=${principalId}, type=${principalType}, success=${success}, context=${context}" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user