weblogic slf4j, logback 대응 / 포탈사용자 패스워드 강제 초기화 기능 추가
This commit is contained in:
@@ -125,5 +125,11 @@ public class PortalUserManController extends BaseAnnotationController {
|
||||
String result = portalUserManService.checkDuplicateId(loginId) ? "success" : "";
|
||||
return ResponseEntity.ok().body(Collections.singletonMap("result", result));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/onl/apim/portaluser/portalUserMan.json", params = "cmd=PASSWORD_RESET")
|
||||
public ResponseEntity<Void> passwordReset(String id) {
|
||||
portalUserManService.passwordReset(id);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -173,4 +173,21 @@ public class PortalUserManService extends BaseService {
|
||||
return !portalUserService.existsByLoginId(loginId);
|
||||
}
|
||||
|
||||
public void passwordReset(String id) {
|
||||
PortalUser portalUser = portalUserService.getById(id);
|
||||
|
||||
// 패스워드를 초기 패스워드("!" + loginId)로 초기화
|
||||
portalUser.setPasswordHash(kjbSafedbPasswordEncoder.encode("!" + portalUser.getLoginId()));
|
||||
|
||||
// 로그인 실패 횟수 초기화
|
||||
portalUser.setLoginFailureCount(0);
|
||||
|
||||
// 계정 잠금 해제
|
||||
portalUser.setAccountLockYn("N");
|
||||
|
||||
portalUserService.save(portalUser);
|
||||
|
||||
log.info("Password reset for user: {}", portalUser.getLoginId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user