|
|
|
@ -17,6 +17,7 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
|
|
|
|
|
import cokr.xit.base.security.authentication.service.AuthenticationService;
|
|
|
|
|
import cokr.xit.base.user.service.bean.UserBean;
|
|
|
|
|
import cokr.xit.foundation.UserInfo;
|
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
|
|
|
|
|
@ -29,6 +30,8 @@ public class AuthenticationSuccess extends SavedRequestAwareAuthenticationSucces
|
|
|
|
|
private AuthenticationService authenticationService;
|
|
|
|
|
@Resource(name="objectMapper")
|
|
|
|
|
private ObjectMapper objectMapper;
|
|
|
|
|
@Resource(name="userBean")
|
|
|
|
|
private UserBean userBean;
|
|
|
|
|
|
|
|
|
|
/**private boolean rememberCredentials;
|
|
|
|
|
* 로그인 정보 유지 여부를 설정한다.
|
|
|
|
@ -69,6 +72,8 @@ public class AuthenticationSuccess extends SavedRequestAwareAuthenticationSucces
|
|
|
|
|
Object principal = authentication.getPrincipal();
|
|
|
|
|
if (principal instanceof UserInfo user) {
|
|
|
|
|
user.setInfo("loggedInAt", new Date());
|
|
|
|
|
if (userBean.isDefaultPassword(user.getUser().getPassword()))
|
|
|
|
|
user.setInfo("promptPasswordChange", true);
|
|
|
|
|
remember(user, hreq, hresp);
|
|
|
|
|
}
|
|
|
|
|
authenticationService.onLogin(authentication);
|
|
|
|
|