NlibLoginVO DB테이블 변경에 따른 수정에 의해 관련 함수 RENAME처리
This commit is contained in:
parent
3be105a8ac
commit
37949b70f7
@ -465,7 +465,7 @@ public class BoardController extends NlibCommonController
|
|||||||
addParamsToModel(paramMap, model);
|
addParamsToModel(paramMap, model);
|
||||||
|
|
||||||
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||||
if(StringUtil.isEmpty(paramMap.get("regUserName"))) model.addAttribute("regUserName", loginVO.getUserNm());
|
if(StringUtil.isEmpty(paramMap.get("regUserName"))) model.addAttribute("regUserName", loginVO.getName());
|
||||||
if(StringUtil.isEmpty(paramMap.get("email"))) model.addAttribute("regUserName", loginVO.getEmail());
|
if(StringUtil.isEmpty(paramMap.get("email"))) model.addAttribute("regUserName", loginVO.getEmail());
|
||||||
|
|
||||||
return "nlib/board/insertQnAForm";
|
return "nlib/board/insertQnAForm";
|
||||||
|
|||||||
@ -99,7 +99,7 @@ public class NlibCommonController {
|
|||||||
String authKey = null;
|
String authKey = null;
|
||||||
|
|
||||||
if(authentication != null) {
|
if(authentication != null) {
|
||||||
userId = ((NlibLoginVO)authentication.getPrincipal()).getUserId();
|
userId = ((NlibLoginVO)authentication.getPrincipal()).getMbInfoId();
|
||||||
}
|
}
|
||||||
|
|
||||||
authKey = makeAuthKey(userId, request.getSession().getId());
|
authKey = makeAuthKey(userId, request.getSession().getId());
|
||||||
|
|||||||
@ -127,7 +127,7 @@ public class QRCodeUtil {
|
|||||||
throw new Exception("QR 2D바코드로 생성할 사용자 정보가 없습니다.");
|
throw new Exception("QR 2D바코드로 생성할 사용자 정보가 없습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtil.isEmpty(loginVO.getUserId())) {
|
if(StringUtil.isEmpty(loginVO.getMbInfoId())) {
|
||||||
throw new Exception("QR 2D바코드로 생성에 필요한 사용자고유번호 정보가 없습니다.");
|
throw new Exception("QR 2D바코드로 생성에 필요한 사용자고유번호 정보가 없습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,15 +135,15 @@ public class QRCodeUtil {
|
|||||||
throw new Exception("QR 2D바코드로 생성에 필요한 이메일 정보가 없습니다.");
|
throw new Exception("QR 2D바코드로 생성에 필요한 이메일 정보가 없습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtil.isEmpty(loginVO.getUserNm())) {
|
if(StringUtil.isEmpty(loginVO.getName())) {
|
||||||
throw new Exception("QR 2D바코드로 생성에 필요한 이름 정보가 없습니다.");
|
throw new Exception("QR 2D바코드로 생성에 필요한 이름 정보가 없습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// (1) "사용자고유번호;이메일;이름;" 형식으로 문자열을 구성
|
// (1) "사용자고유번호;이메일;이름;" 형식으로 문자열을 구성
|
||||||
String barcodeText = String.format("%s;%s;%s;"
|
String barcodeText = String.format("%s;%s;%s;"
|
||||||
, loginVO.getUserId()
|
, loginVO.getMbInfoId()
|
||||||
, loginVO.getEmail()
|
, loginVO.getEmail()
|
||||||
, loginVO.getUserNm());
|
, loginVO.getName());
|
||||||
log.debug("generateMemberQRCodeImage : barcodeText=" + barcodeText);
|
log.debug("generateMemberQRCodeImage : barcodeText=" + barcodeText);
|
||||||
|
|
||||||
// (2) 앞의 (1)의 문자열을 암호화 처리
|
// (2) 앞의 (1)의 문자열을 암호화 처리
|
||||||
@ -180,9 +180,9 @@ public class QRCodeUtil {
|
|||||||
|
|
||||||
NlibLoginVO info = new NlibLoginVO();
|
NlibLoginVO info = new NlibLoginVO();
|
||||||
|
|
||||||
info.setUserId(split[0]);
|
info.setMbInfoId(split[0]);
|
||||||
info.setEmail(split[1]);
|
info.setEmail(split[1]);
|
||||||
info.setUserNm(split[2]);
|
info.setName(split[2]);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,9 +47,9 @@ public class BarcodeController {
|
|||||||
|
|
||||||
log.debug("getMemberQRCodeForm : loginVO=" + loginVO.toString());
|
log.debug("getMemberQRCodeForm : loginVO=" + loginVO.toString());
|
||||||
|
|
||||||
if(StringUtil.isEmpty(loginVO.getUserId())) loginVO.setUserId("USER0001-000001");
|
if(StringUtil.isEmpty(loginVO.getMbInfoId())) loginVO.setMbInfoId("USER0001-000001");
|
||||||
if(StringUtil.isEmpty(loginVO.getEmail())) loginVO.setEmail("myid@digitalship.co.kr");
|
if(StringUtil.isEmpty(loginVO.getEmail())) loginVO.setEmail("myid@digitalship.co.kr");
|
||||||
if(StringUtil.isEmpty(loginVO.getUserNm())) loginVO.setUserNm("홍길동");
|
if(StringUtil.isEmpty(loginVO.getName())) loginVO.setName("홍길동");
|
||||||
|
|
||||||
model.addAttribute("loginVO", loginVO);
|
model.addAttribute("loginVO", loginVO);
|
||||||
|
|
||||||
|
|||||||
@ -67,7 +67,7 @@ public class SecUserVO extends NlibLoginVO implements UserDetails {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getPassword() {
|
public String getPassword() {
|
||||||
return super.getUserPwd();
|
return super.getPassword();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 계정의 이름을 리턴한다. (사용자ID:email형식의 LOGIN_USER_ID 정보)
|
/* 계정의 이름을 리턴한다. (사용자ID:email형식의 LOGIN_USER_ID 정보)
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import nlib.util.StringUtil;
|
|||||||
* @ ------------ -------- ---------------------------
|
* @ ------------ -------- ---------------------------
|
||||||
* @ 2021. 7. 12. JSYOO 최초 생성
|
* @ 2021. 7. 12. JSYOO 최초 생성
|
||||||
* @ 2021. 8. 17. KNKIM DB컬럼명으로 변경 처리
|
* @ 2021. 8. 17. KNKIM DB컬럼명으로 변경 처리
|
||||||
|
* @ 2021. 8. 24. KNKIM 테이블 변경에 따른 컬럼명 전체 변경
|
||||||
*
|
*
|
||||||
* @author 이씨플라자 * DIGITALSHIP JSYOO
|
* @author 이씨플라자 * DIGITALSHIP JSYOO
|
||||||
* @since 2021. 7. 12.
|
* @since 2021. 7. 12.
|
||||||
@ -32,31 +33,41 @@ public class NlibLoginVO implements Serializable {
|
|||||||
|
|
||||||
private static final long serialVersionUID = -8274004534207618049L;
|
private static final long serialVersionUID = -8274004534207618049L;
|
||||||
|
|
||||||
private String userId; /* 사용자아이디 (ex: U1000000001) */
|
/* MB_INFO : 소장자료관 회원 관련 */
|
||||||
|
private String mbInfoId; /* 회원아이디 (ex: M1000000001) */
|
||||||
private String loginUserId; /* 로그인사용자ID (이메일주소) */
|
private String loginUserId; /* 로그인사용자ID (이메일주소) */
|
||||||
private String deptSeq; /* 조직코드 */
|
private String name; /* 사용자명 */
|
||||||
private String deptNm; /* 조직명 */
|
private String mobileNo; /* 휴대전화번호 */
|
||||||
private String userNm; /* 사용자명 */
|
private String password; /* 비밀번호 */
|
||||||
private String userPwd; /* 비밀번호 */
|
private String email; /* 이메일 */
|
||||||
private String telNo; /* 전화번호 */
|
private String gender; /* 성별(M:남자,F:여자) */
|
||||||
private String zipcode; /* 우편번호 (변경예정) */
|
private String zipCode; /* 우편번호 */
|
||||||
private String addr1; /* 주소1 (변경예정) */
|
private String address; /* 주소 */
|
||||||
private String addr2; /* 주소2 (변경예정) */
|
private String addressDetail; /* 상세주소 */
|
||||||
|
private String birthday; /* 생년월일 */
|
||||||
private String status; /* 상태 : S정상, D탈퇴, P휴면 */
|
private String status; /* 상태 : S정상, D탈퇴, P휴면 */
|
||||||
|
private String joinDate; /* 가입일자 (YYYYMMDD) */
|
||||||
|
private String verificationDd; /* 본인확인일시 (YYYYMMDDHHMISS) */
|
||||||
|
private String lastAccessDd; /* 마지막접근일시 (YYYYMMDDHHMISS) */
|
||||||
|
private String leaveSiteDate; /* 탈퇴일자 (YYYYMMDD) */
|
||||||
private String regId; /* 등록자 */
|
private String regId; /* 등록자 */
|
||||||
private String regDd; /* 등록일자 */
|
private String regDd; /* 등록일자 */
|
||||||
private String modId; /* 수정자 */
|
private String modId; /* 수정자 */
|
||||||
private String modDd; /* 수정일자 */
|
private String modDd; /* 수정일자 */
|
||||||
private String email; /* 이메일 */
|
|
||||||
private String mobileNo; /* 모바일 */
|
|
||||||
|
|
||||||
private String birthdate; /* 생년월일 */
|
/* MB_SITE : 로그인된 문화원정보 관련 */
|
||||||
private String gender; /* 성별(M:남자,F:여자) */
|
private String joinType; /* 가입유형 : SNS 및 로그인을 연계하는 포털시스템 아이디(naver, daum 등) */
|
||||||
|
private String joinCouncilCd; /* 가입문화원코드 */
|
||||||
|
private String joinCouncilNm; /* 가입문화원명 */
|
||||||
|
|
||||||
private String authKey; /* 로그인 인증키 */
|
/* MB_SNS : 회원SNS 관련 */
|
||||||
private String loginSucsYn; /* 로그인성공여부 */
|
private String snsType; /* SNS유형 */
|
||||||
private String accIp; /* 접속IP */
|
private String snsId; /* SNS식별코드 */
|
||||||
|
|
||||||
|
/* 보완 및 기타 사항 */
|
||||||
|
private String ip; /* 접속IP */
|
||||||
private String authorityList; /* 권한ROLE 리스트 */
|
private String authorityList; /* 권한ROLE 리스트 */
|
||||||
|
private String authKey; /* RESTful API : 접속인증코드 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 로그인인증키값을 리턴한다. 만일 존재하지 않을 경우, userId를 기반으로 인증키를 생성하여 리턴한다.
|
* 로그인인증키값을 리턴한다. 만일 존재하지 않을 경우, userId를 기반으로 인증키를 생성하여 리턴한다.
|
||||||
@ -65,7 +76,7 @@ public class NlibLoginVO implements Serializable {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getAndCreateAuthKey() {
|
public String getAndCreateAuthKey() {
|
||||||
return getAndCreateAuthKey(null);
|
return getOrCreateAuthKey(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -74,11 +85,12 @@ public class NlibLoginVO implements Serializable {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getAndCreateAuthKey(String sessionId) {
|
public String getOrCreateAuthKey(String sessionId) {
|
||||||
|
|
||||||
if(StringUtil.isNotEmpty(this.authKey)) return this.authKey;
|
if(StringUtil.isNotEmpty(this.authKey)) return this.authKey;
|
||||||
|
|
||||||
// AuthKey 생성하여 리턴
|
// AuthKey 생성하여 리턴
|
||||||
this.authKey = NlibCommonController.makeAuthKey(this.userId, sessionId);
|
this.authKey = NlibCommonController.makeAuthKey(this.mbInfoId, sessionId);
|
||||||
return this.authKey;
|
return this.authKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,13 +98,13 @@ public class NlibLoginVO implements Serializable {
|
|||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
// SETTER.GETTER
|
// SETTER.GETTER
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
||||||
public String getUserId() {
|
public String getMbInfoId() {
|
||||||
return userId;
|
return mbInfoId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
public void setMbInfoId(String mbInfoId) {
|
||||||
this.userId = userId;
|
this.mbInfoId = mbInfoId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLoginUserId() {
|
public String getLoginUserId() {
|
||||||
@ -103,72 +115,76 @@ public class NlibLoginVO implements Serializable {
|
|||||||
this.loginUserId = loginUserId;
|
this.loginUserId = loginUserId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDeptSeq() {
|
|
||||||
return deptSeq;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeptSeq(String deptSeq) {
|
|
||||||
this.deptSeq = deptSeq;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDeptNm() {
|
|
||||||
return deptNm;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeptNm(String deptNm) {
|
|
||||||
this.deptNm = deptNm;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserNm() {
|
|
||||||
return userNm;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return userNm;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserNm(String userNm) {
|
public void setName(String name) {
|
||||||
this.userNm = userNm;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUserPwd() {
|
public String getMobileNo() {
|
||||||
return userPwd;
|
return mobileNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserPwd(String userPwd) {
|
public void setMobileNo(String mobileNo) {
|
||||||
this.userPwd = userPwd;
|
this.mobileNo = mobileNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTelNo() {
|
public String getPassword() {
|
||||||
return telNo;
|
return password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTelNo(String telNo) {
|
public void setPassword(String password) {
|
||||||
this.telNo = telNo;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getZipcode() {
|
public String getEmail() {
|
||||||
return zipcode;
|
return email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setZipcode(String zipcode) {
|
public void setEmail(String email) {
|
||||||
this.zipcode = zipcode;
|
this.email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAddr1() {
|
public String getGender() {
|
||||||
return addr1;
|
return gender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAddr1(String addr1) {
|
public void setGender(String gender) {
|
||||||
this.addr1 = addr1;
|
this.gender = gender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAddr2() {
|
public String getZipCode() {
|
||||||
return addr2;
|
return zipCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAddr2(String addr2) {
|
public void setZipCode(String zipCode) {
|
||||||
this.addr2 = addr2;
|
this.zipCode = zipCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress() {
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address) {
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddressDetail() {
|
||||||
|
return addressDetail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddressDetail(String addressDetail) {
|
||||||
|
this.addressDetail = addressDetail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBirthday() {
|
||||||
|
return birthday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBirthday(String birthday) {
|
||||||
|
this.birthday = birthday;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStatus() {
|
public String getStatus() {
|
||||||
@ -179,6 +195,38 @@ public class NlibLoginVO implements Serializable {
|
|||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getJoinDate() {
|
||||||
|
return joinDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJoinDate(String joinDate) {
|
||||||
|
this.joinDate = joinDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVerificationDd() {
|
||||||
|
return verificationDd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVerificationDd(String verificationDd) {
|
||||||
|
this.verificationDd = verificationDd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastAccessDd() {
|
||||||
|
return lastAccessDd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastAccessDd(String lastAccessDd) {
|
||||||
|
this.lastAccessDd = lastAccessDd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLeaveSiteDate() {
|
||||||
|
return leaveSiteDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLeaveSiteDate(String leaveSiteDate) {
|
||||||
|
this.leaveSiteDate = leaveSiteDate;
|
||||||
|
}
|
||||||
|
|
||||||
public String getRegId() {
|
public String getRegId() {
|
||||||
return regId;
|
return regId;
|
||||||
}
|
}
|
||||||
@ -211,36 +259,60 @@ public class NlibLoginVO implements Serializable {
|
|||||||
this.modDd = modDd;
|
this.modDd = modDd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEmail() {
|
public String getJoinType() {
|
||||||
return email;
|
return joinType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEmail(String email) {
|
public void setJoinType(String joinType) {
|
||||||
this.email = email;
|
this.joinType = joinType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMobileNo() {
|
public String getJoinCouncilCd() {
|
||||||
return mobileNo;
|
return joinCouncilCd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMobileNo(String mobileNo) {
|
public void setJoinCouncilCd(String joinCouncilCd) {
|
||||||
this.mobileNo = mobileNo;
|
this.joinCouncilCd = joinCouncilCd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getBirthdate() {
|
public String getJoinCouncilNm() {
|
||||||
return birthdate;
|
return joinCouncilNm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBirthdate(String birthdate) {
|
public void setJoinCouncilNm(String joinCouncilNm) {
|
||||||
this.birthdate = birthdate;
|
this.joinCouncilNm = joinCouncilNm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getGender() {
|
public String getSnsType() {
|
||||||
return gender;
|
return snsType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGender(String gender) {
|
public void setSnsType(String snsType) {
|
||||||
this.gender = gender;
|
this.snsType = snsType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSnsId() {
|
||||||
|
return snsId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSnsId(String snsId) {
|
||||||
|
this.snsId = snsId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIp() {
|
||||||
|
return ip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIp(String ip) {
|
||||||
|
this.ip = ip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAuthorityList() {
|
||||||
|
return authorityList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuthorityList(String authorityList) {
|
||||||
|
this.authorityList = authorityList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAuthKey() {
|
public String getAuthKey() {
|
||||||
@ -251,28 +323,4 @@ public class NlibLoginVO implements Serializable {
|
|||||||
this.authKey = authKey;
|
this.authKey = authKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLoginSucsYn() {
|
|
||||||
return loginSucsYn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoginSucsYn(String loginSucsYn) {
|
|
||||||
this.loginSucsYn = loginSucsYn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAccIp() {
|
|
||||||
return accIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAccIp(String accIp) {
|
|
||||||
this.accIp = accIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAuthorityList() {
|
|
||||||
return authorityList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAuthorityList(String authorityList) {
|
|
||||||
this.authorityList = authorityList;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -147,7 +147,7 @@ public class LoginServiceImpl implements LoginService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 아이디와 패스워드로, Security 가 알아 볼 수 있는 token 객체로 변경한다.
|
// 아이디와 패스워드로, Security 가 알아 볼 수 있는 token 객체로 변경한다.
|
||||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getUserPwd());
|
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getPassword());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
// AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
||||||
@ -188,7 +188,7 @@ public class LoginServiceImpl implements LoginService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 아이디와 패스워드로, Security 가 알아 볼 수 있는 token 객체로 변경한다.
|
// 아이디와 패스워드로, Security 가 알아 볼 수 있는 token 객체로 변경한다.
|
||||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getUserPwd());
|
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getPassword());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
// AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
||||||
@ -196,14 +196,13 @@ public class LoginServiceImpl implements LoginService
|
|||||||
|
|
||||||
// AuthKey 등록
|
// AuthKey 등록
|
||||||
SecUserVO userVO = (SecUserVO)authentication.getPrincipal();
|
SecUserVO userVO = (SecUserVO)authentication.getPrincipal();
|
||||||
userVO.getAndCreateAuthKey(req.getSession().getId()); // SET AUTHKEY
|
userVO.getOrCreateAuthKey(req.getSession().getId()); // SET AUTHKEY
|
||||||
|
|
||||||
// 실제 SecurityContext 에 authentication 정보를 등록한다.
|
// 실제 SecurityContext 에 authentication 정보를 등록한다.
|
||||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||||
|
|
||||||
// TODO : 로그인 로그 정보를 통합자료시스템에 전송한다.
|
// TODO : 로그인 로그 정보를 통합자료시스템에 전송한다.
|
||||||
userVO.setAccIp(req.getRemoteAddr());
|
userVO.setIp(req.getRemoteAddr());
|
||||||
userVO.setLoginSucsYn("Y");
|
|
||||||
loginDAO.insertLoginLog(userVO);
|
loginDAO.insertLoginLog(userVO);
|
||||||
|
|
||||||
} catch (DisabledException e) {
|
} catch (DisabledException e) {
|
||||||
@ -243,7 +242,7 @@ public class LoginServiceImpl implements LoginService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 아이디와 패스워드로, Security 가 알아 볼 수 있는 token 객체로 변경한다.
|
// 아이디와 패스워드로, Security 가 알아 볼 수 있는 token 객체로 변경한다.
|
||||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getUserPwd());
|
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getPassword());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
// AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
||||||
@ -251,14 +250,13 @@ public class LoginServiceImpl implements LoginService
|
|||||||
|
|
||||||
// AuthKey 등록
|
// AuthKey 등록
|
||||||
SecUserVO userVO = (SecUserVO)authentication.getPrincipal();
|
SecUserVO userVO = (SecUserVO)authentication.getPrincipal();
|
||||||
userVO.getAndCreateAuthKey(req.getSession().getId()); // SET AUTHKEY
|
userVO.getOrCreateAuthKey(req.getSession().getId()); // SET AUTHKEY
|
||||||
|
|
||||||
// 실제 SecurityContext 에 authentication 정보를 등록한다.
|
// 실제 SecurityContext 에 authentication 정보를 등록한다.
|
||||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||||
|
|
||||||
// TODO : 로그인 로그 정보를 통합자료시스템에 전송한다.
|
// TODO : 로그인 로그 정보를 통합자료시스템에 전송한다.
|
||||||
userVO.setAccIp(req.getRemoteAddr());
|
userVO.setIp(req.getRemoteAddr());
|
||||||
userVO.setLoginSucsYn("Y");
|
|
||||||
loginDAO.insertLoginLog(userVO);
|
loginDAO.insertLoginLog(userVO);
|
||||||
|
|
||||||
} catch (DisabledException e) {
|
} catch (DisabledException e) {
|
||||||
|
|||||||
@ -37,8 +37,8 @@ public class MemberServiceImpl implements MemberService
|
|||||||
|
|
||||||
public void insertMemberInfo(NlibLoginVO vo) throws Exception {
|
public void insertMemberInfo(NlibLoginVO vo) throws Exception {
|
||||||
String encodedText=null;
|
String encodedText=null;
|
||||||
encodedText = egovPasswordEncoder.encryptPassword(vo.getUserPwd());
|
encodedText = egovPasswordEncoder.encryptPassword(vo.getPassword());
|
||||||
vo.setUserPwd(encodedText);
|
vo.setPassword(encodedText);
|
||||||
memberDAO.insertMemberInfo(vo);
|
memberDAO.insertMemberInfo(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -315,7 +315,7 @@ public class MemberController {
|
|||||||
String encodedText=null;
|
String encodedText=null;
|
||||||
|
|
||||||
//ID와 핸드폰 번호가 일치하는지 확인
|
//ID와 핸드폰 번호가 일치하는지 확인
|
||||||
if(loginVO!=null && (loginVO.getTelNo().equals(vo.getTelNo()) && loginVO.getLoginUserId().equals(vo.getLoginUserId())))
|
if(loginVO!=null && (loginVO.getMobileNo().equals(vo.getMobileNo()) && loginVO.getLoginUserId().equals(vo.getLoginUserId())))
|
||||||
{
|
{
|
||||||
String reciver = vo.getLoginUserId(); //받을사람의 이메일입니다.-> naver nate 등등
|
String reciver = vo.getLoginUserId(); //받을사람의 이메일입니다.-> naver nate 등등
|
||||||
String subject = "온라인자료대출시스템 비밀번호 초기화 메일입니다.";
|
String subject = "온라인자료대출시스템 비밀번호 초기화 메일입니다.";
|
||||||
@ -347,9 +347,9 @@ public class MemberController {
|
|||||||
emailSender.SendEmail(email);
|
emailSender.SendEmail(email);
|
||||||
|
|
||||||
encodedText = egovPasswordEncoder.encryptPassword(InitPwd);
|
encodedText = egovPasswordEncoder.encryptPassword(InitPwd);
|
||||||
vo.setUserPwd(encodedText);
|
vo.setPassword(encodedText);
|
||||||
|
|
||||||
vo.setUserId(gUserId);
|
vo.setMbInfoId(gUserId);
|
||||||
|
|
||||||
//암호화된 비밀번호로 수정
|
//암호화된 비밀번호로 수정
|
||||||
memberService.changePassword(vo);
|
memberService.changePassword(vo);
|
||||||
|
|||||||
@ -72,11 +72,11 @@ public class UserInfoController {
|
|||||||
NlibLoginVO loginVO =userInfoService.selectMyInfo(vo);
|
NlibLoginVO loginVO =userInfoService.selectMyInfo(vo);
|
||||||
|
|
||||||
String encodedText=null;
|
String encodedText=null;
|
||||||
encodedText = egovPasswordEncoder.encryptPassword(vo.getUserPwd());
|
encodedText = egovPasswordEncoder.encryptPassword(vo.getPassword());
|
||||||
vo.setUserPwd(encodedText);
|
vo.setPassword(encodedText);
|
||||||
|
|
||||||
//암호화된 패스워드 비교
|
//암호화된 패스워드 비교
|
||||||
if(loginVO.getUserPwd().equals(vo.getUserPwd())) {
|
if(loginVO.getPassword().equals(vo.getPassword())) {
|
||||||
model.addAttribute("loginVO",loginVO);
|
model.addAttribute("loginVO",loginVO);
|
||||||
return "nlib/userInfo/putMyInfo";
|
return "nlib/userInfo/putMyInfo";
|
||||||
}else {
|
}else {
|
||||||
@ -95,8 +95,8 @@ public class UserInfoController {
|
|||||||
public @ResponseBody void updateMyInfo(NlibLoginVO vo,HttpServletResponse response,HttpServletRequest request) throws Exception{
|
public @ResponseBody void updateMyInfo(NlibLoginVO vo,HttpServletResponse response,HttpServletRequest request) throws Exception{
|
||||||
|
|
||||||
String encodedText=null;
|
String encodedText=null;
|
||||||
encodedText = egovPasswordEncoder.encryptPassword(vo.getUserPwd());
|
encodedText = egovPasswordEncoder.encryptPassword(vo.getPassword());
|
||||||
vo.setUserPwd(encodedText);
|
vo.setPassword(encodedText);
|
||||||
|
|
||||||
userInfoService.updateMyInfo(vo);
|
userInfoService.updateMyInfo(vo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,20 +4,37 @@
|
|||||||
<mapper namespace="LoginDAO">
|
<mapper namespace="LoginDAO">
|
||||||
|
|
||||||
<select id="selectLoginUserInfo" parameterType="String" resultType="NlibLoginVO">
|
<select id="selectLoginUserInfo" parameterType="String" resultType="NlibLoginVO">
|
||||||
SELECT A.*, B.SNS_DIV, B.SNS_USER_ID, SNS_LOGIN_ID, SSO_REG_DT,
|
SELECT
|
||||||
CASE WHEN A.USER_DIV = '1' THEN 'ROLE_USER'
|
A.MB_INFO_ID
|
||||||
WHEN A.USER_DIV = '2' THEN 'ROLE_USER, ROLE_ADMIN'
|
, A.LOGIN_USER_ID
|
||||||
WHEN A.USER_DIV = '3' THEN 'ROLE_USER, ROLE_ADMIN, ROLE_SYSTEM'
|
, A.NAME
|
||||||
ELSE ''
|
, A.MOBILE_NO
|
||||||
END AS AUTHORITY_LIST
|
, A.PASSWORD
|
||||||
FROM TMP_SM_USER A /* 사용자정보 */
|
, A.EMAIL
|
||||||
JOIN TMP_SM_USER_SNS B /* 사용자 SNS 정보 */
|
, A.GENDER
|
||||||
ON A.USER_ID = B.USER_ID
|
, A.ZIP_CODE
|
||||||
WHERE A.USE_YN = 'Y'
|
, A.ADDRESS
|
||||||
AND B.SNS_DIV = 'N'
|
, A.ADDRESS_DETAIL
|
||||||
AND B.SNS_USER_ID = #{snsUserId}
|
, A.BIRTHDAY
|
||||||
AND B.SSO_DEL_DT IS NULL /* 연동해제건 제외 */
|
, A.STATUS
|
||||||
LIMIT 1
|
, A.JOIN_DATE
|
||||||
|
, A.VERIFICATION_DD
|
||||||
|
, A.LAST_ACCESS_DD
|
||||||
|
, A.LEAVE_SITE_DATE
|
||||||
|
, A.REG_ID
|
||||||
|
, A.REG_DD
|
||||||
|
, A.MOD_ID
|
||||||
|
, A.MOD_DD
|
||||||
|
, B.SNS_TYPE
|
||||||
|
, B.SNS_ID
|
||||||
|
, 'ROLE_USER' AS AUTHORITY_LIST
|
||||||
|
FROM UAC_CLTR_DB.MB_INFO A /* 사용자정보 */
|
||||||
|
JOIN UAC_CLTR_DB.MB_SNS B /* 사용자 SNS 정보 */
|
||||||
|
ON A.MB_INFO_ID = B.MB_INFO_ID
|
||||||
|
WHERE B.SNS_ID = '#{snsId}'
|
||||||
|
AND SNS_TYPE = '#{snsType}'
|
||||||
|
AND B.UNLINK_DD IS NULL /* 연동해제건 제외 */
|
||||||
|
LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertLoginLog" parameterType="NlibLoginVO">
|
<insert id="insertLoginLog" parameterType="NlibLoginVO">
|
||||||
@ -30,11 +47,11 @@
|
|||||||
,LOGIN_SUCS_YN
|
,LOGIN_SUCS_YN
|
||||||
,ACC_DATE
|
,ACC_DATE
|
||||||
) VALUES (
|
) VALUES (
|
||||||
#{userId}
|
#{mbInfoId}
|
||||||
,#{userNm}
|
,#{name}
|
||||||
,#{deptSeq}
|
,#{joinCouncilCd}
|
||||||
,#{deptNm}
|
,#{joinCouncilNm}
|
||||||
,#{accIp}
|
,#{ip}
|
||||||
,'Y'
|
,'Y'
|
||||||
,NOW()
|
,NOW()
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user