비밀번호 초기화 관련 수정

master
mjkhan21 5 months ago
parent 649465c8ea
commit 63092ba7fd

@ -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);

Loading…
Cancel
Save