UserLog 엔티티 필드 추가 및 관련 API User-Agent 처리 지원
eapim-portal CI (from elink-portal-common) / build (push) Has been cancelled
eapim-portal CI (from elink-portal-common) / build (push) Has been cancelled
- UserLog에 userAgent(500자)와 duplicate(Boolean) 컬럼 추가 - 로그인/실패/로그아웃 로깅 시 User-Agent와 중복 세션 여부 기록 - TwoFactorService/Controller Request 객체 전달 및 처리 반영
This commit is contained in:
@@ -53,4 +53,19 @@ public class UserLog {
|
||||
@Column(name = "login_type", length = 32)
|
||||
private String loginType;
|
||||
|
||||
/**
|
||||
* 요청 User-Agent 헤더 원문. 컬럼 길이(500)를 넘기면 ORA-12899 로 로그인 자체가 실패하므로
|
||||
* 저장 측({@code PortalUserLogService})에서 잘라 넣는다. 헤더 미전송 요청은 null.
|
||||
*/
|
||||
@Column(name = "user_agent", length = 500)
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 중복 로그인 여부 — 로그인 시점에 다른 기기/브라우저의 활성 세션이 남아 있어
|
||||
* 기존 세션이 강제 해제된 건이면 true. 실패 행·과거 행은 null.
|
||||
* <p>primitive 가 아닌 래퍼 타입인 이유: 기존 행은 NULL 이라 primitive 로 읽으면 매핑에서 깨진다.
|
||||
*/
|
||||
@Column(name = "duplicate")
|
||||
private Boolean duplicate;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user