개인정보 암/복호화 공통 모듈화
This commit is contained in:
parent
0bb42e589c
commit
821363335d
@ -45,6 +45,9 @@ public class SecUserDAO extends EgovComAbstractDAO {
|
|||||||
if(uInfo == null) {
|
if(uInfo == null) {
|
||||||
uInfo = new SecUserVO();
|
uInfo = new SecUserVO();
|
||||||
} else {
|
} else {
|
||||||
|
// 개인정보 복호화
|
||||||
|
uInfo.decodePrivateInfo();
|
||||||
|
|
||||||
// 다중 권한 설정
|
// 다중 권한 설정
|
||||||
String authorities = (String)uInfo.getAuthorityList();
|
String authorities = (String)uInfo.getAuthorityList();
|
||||||
if(StringUtil.isEmpty(authorities)) {
|
if(StringUtil.isEmpty(authorities)) {
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import org.springframework.security.core.GrantedAuthority;
|
|||||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
|
|
||||||
|
import nlib.cmm.crypto.AriaCrypto;
|
||||||
import nlib.cmm.service.NlibProperty;
|
import nlib.cmm.service.NlibProperty;
|
||||||
import nlib.user.service.NlibLoginVO;
|
import nlib.user.service.NlibLoginVO;
|
||||||
|
|
||||||
@ -51,7 +52,6 @@ public class SecUserVO extends NlibLoginVO implements UserDetails {
|
|||||||
auth.add(new SimpleGrantedAuthority(authName));
|
auth.add(new SimpleGrantedAuthority(authName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 계정이 갖고있는 권한 목록을 리턴한다.
|
/* 계정이 갖고있는 권한 목록을 리턴한다.
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.springframework.security.core.userdetails.UserDetails#getAuthorities()
|
* @see org.springframework.security.core.userdetails.UserDetails#getAuthorities()
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import java.io.Serializable;
|
|||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
|
|
||||||
import nlib.cmm.NlibCommonController;
|
import nlib.cmm.NlibCommonController;
|
||||||
|
import nlib.cmm.crypto.AriaCrypto;
|
||||||
import nlib.util.StringUtil;
|
import nlib.util.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,6 +79,34 @@ public class NlibLoginVO implements Serializable {
|
|||||||
private String mobileVrfctNo = null; /* 본인확인 인증번호 */
|
private String mobileVrfctNo = null; /* 본인확인 인증번호 */
|
||||||
private String mobileVrfctDd = null; /* 본인확인 인증번호 발송일자 */
|
private String mobileVrfctDd = null; /* 본인확인 인증번호 발송일자 */
|
||||||
|
|
||||||
|
private boolean alerted = false; /* 로그인 후, 읽지 않은 알림 표출 여부 */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 개인정보 암호화 내용 양방황 암호화 처리 대상인 항목에 대하여 인코딩 처리
|
||||||
|
*/
|
||||||
|
public void encodePrivateInfo() {
|
||||||
|
|
||||||
|
setMobileNo (AriaCrypto.encode(getMobileNo()));
|
||||||
|
setEmail (AriaCrypto.encode(getEmail()));
|
||||||
|
setZipCode (AriaCrypto.encode(getZipCode()));
|
||||||
|
setAddress (AriaCrypto.encode(getAddress()));
|
||||||
|
setAddressDetail(AriaCrypto.encode(getAddressDetail()));
|
||||||
|
setBirthday (AriaCrypto.encode(getBirthday()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 개인정보 암호화 내용 양방황 암호화 처리 대상인 항목에 대하여 복호화 처리
|
||||||
|
*/
|
||||||
|
public void decodePrivateInfo() {
|
||||||
|
|
||||||
|
setMobileNo (AriaCrypto.decode(getMobileNo()));
|
||||||
|
setEmail (AriaCrypto.decode(getEmail()));
|
||||||
|
setZipCode (AriaCrypto.decode(getZipCode()));
|
||||||
|
setAddress (AriaCrypto.decode(getAddress()));
|
||||||
|
setAddressDetail(AriaCrypto.decode(getAddressDetail()));
|
||||||
|
setBirthday (AriaCrypto.decode(getBirthday()));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 로그인인증키값을 리턴한다. 만일 존재하지 않을 경우, userId를 기반으로 인증키를 생성하여 리턴한다.
|
* 로그인인증키값을 리턴한다. 만일 존재하지 않을 경우, userId를 기반으로 인증키를 생성하여 리턴한다.
|
||||||
@ -397,5 +426,13 @@ public class NlibLoginVO implements Serializable {
|
|||||||
public void setEmailVrfctDd(String emailVrfctDd) {
|
public void setEmailVrfctDd(String emailVrfctDd) {
|
||||||
this.emailVrfctDd = emailVrfctDd;
|
this.emailVrfctDd = emailVrfctDd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isAlerted() {
|
||||||
|
return alerted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlerted(boolean alerted) {
|
||||||
|
this.alerted = alerted;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,12 +28,7 @@ public class LoginDAO extends EgovComAbstractDAO {
|
|||||||
|
|
||||||
// 개인정보 암호화 내용 복호화 처리
|
// 개인정보 암호화 내용 복호화 처리
|
||||||
if(nlibLoginVO != null) {
|
if(nlibLoginVO != null) {
|
||||||
nlibLoginVO.setMobileNo(AriaCrypto.decode(nlibLoginVO.getMobileNo()));
|
nlibLoginVO.decodePrivateInfo();
|
||||||
nlibLoginVO.setEmail(AriaCrypto.decode(nlibLoginVO.getEmail()));
|
|
||||||
nlibLoginVO.setZipCode(AriaCrypto.decode(nlibLoginVO.getZipCode()));
|
|
||||||
nlibLoginVO.setAddress(AriaCrypto.decode(nlibLoginVO.getAddress()));
|
|
||||||
nlibLoginVO.setAddressDetail(AriaCrypto.decode(nlibLoginVO.getAddressDetail()));
|
|
||||||
nlibLoginVO.setBirthday(AriaCrypto.decode(nlibLoginVO.getBirthday()));
|
|
||||||
}
|
}
|
||||||
return (NlibLoginVO) nlibLoginVO;
|
return (NlibLoginVO) nlibLoginVO;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user