ing
This commit is contained in:
parent
c06b67ec42
commit
b551285dd2
2
pom.xml
2
pom.xml
|
@ -51,7 +51,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.loafle.overflow</groupId>
|
<groupId>com.loafle.overflow</groupId>
|
||||||
<artifactId>commons-java</artifactId>
|
<artifactId>commons-java</artifactId>
|
||||||
<version>1.0.60-SNAPSHOT</version>
|
<version>1.0.62-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class CentralMemberService implements MemberService {
|
||||||
return dm;
|
return dm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Member signup(Member member, String pw) throws OverflowException {
|
public Member signup(Member member, String password) throws OverflowException {
|
||||||
|
|
||||||
Member isMember = this.memberDAO.findByEmail(member.getEmail());
|
Member isMember = this.memberDAO.findByEmail(member.getEmail());
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ public class CentralMemberService implements MemberService {
|
||||||
throw new OverflowException("JoinedEmailException()", new Throwable());
|
throw new OverflowException("JoinedEmailException()", new Throwable());
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean checkPass = this.isPasswordStrong(pw);
|
boolean checkPass = this.isPasswordStrong(password);
|
||||||
|
|
||||||
if (!checkPass) {
|
if (!checkPass) {
|
||||||
throw new OverflowException("PasswordNotStrongException()", new Throwable());
|
throw new OverflowException("PasswordNotStrongException()", new Throwable());
|
||||||
|
@ -95,7 +95,7 @@ public class CentralMemberService implements MemberService {
|
||||||
// "special character, lowercase letter, and number, " +
|
// "special character, lowercase letter, and number, " +
|
||||||
// "and must be at least 6 characters long.");
|
// "and must be at least 6 characters long.");
|
||||||
}
|
}
|
||||||
member.setPassword(passwordEncoder.encode(pw));
|
member.setPassword(passwordEncoder.encode(password));
|
||||||
|
|
||||||
if (member.getMetaMemberStatus() == null) {
|
if (member.getMetaMemberStatus() == null) {
|
||||||
member.setMetaMemberStatus(new MetaMemberStatus((short) 1));
|
member.setMetaMemberStatus(new MetaMemberStatus((short) 1));
|
||||||
|
@ -132,7 +132,7 @@ public class CentralMemberService implements MemberService {
|
||||||
return member;
|
return member;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Member resetPassword(String token, String pw) throws OverflowException {
|
public Member resetPassword(String token, String password) throws OverflowException {
|
||||||
String deStr = null;
|
String deStr = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -154,7 +154,7 @@ public class CentralMemberService implements MemberService {
|
||||||
throw new OverflowException("", null);
|
throw new OverflowException("", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean checkPass = this.isPasswordStrong(pw);
|
boolean checkPass = this.isPasswordStrong(password);
|
||||||
|
|
||||||
if (!checkPass) {
|
if (!checkPass) {
|
||||||
throw new OverflowException("PasswordNotStrongException()", new Throwable());
|
throw new OverflowException("PasswordNotStrongException()", new Throwable());
|
||||||
|
@ -162,7 +162,7 @@ public class CentralMemberService implements MemberService {
|
||||||
// "special character, lowercase letter, and number, " +
|
// "special character, lowercase letter, and number, " +
|
||||||
// "and must be at least 6 characters long.");
|
// "and must be at least 6 characters long.");
|
||||||
}
|
}
|
||||||
member.setPassword(passwordEncoder.encode(pw));
|
member.setPassword(passwordEncoder.encode(password));
|
||||||
|
|
||||||
return this.modify(member);
|
return this.modify(member);
|
||||||
}
|
}
|
||||||
|
@ -183,15 +183,15 @@ public class CentralMemberService implements MemberService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@WebappAPI
|
@WebappAPI
|
||||||
public Member modify(Member member, String pw) throws OverflowException {
|
public Member modify(Member member, String password) throws OverflowException {
|
||||||
Member preMember = this.memberDAO.findByEmail(member.getEmail());
|
Member preMember = this.memberDAO.findByEmail(member.getEmail());
|
||||||
|
|
||||||
if (null == preMember || 0 >= preMember.getId()) {
|
if (null == preMember || 0 >= preMember.getId()) {
|
||||||
throw new OverflowException("SigninId Not Exist()", new Throwable());
|
throw new OverflowException("SigninId Not Exist()", new Throwable());
|
||||||
}
|
}
|
||||||
member.setId(preMember.getId());
|
member.setId(preMember.getId());
|
||||||
if (null != pw && !pw.equals("")) {
|
if (null != password && !password.equals("")) {
|
||||||
boolean checkPass = this.isPasswordStrong(pw);
|
boolean checkPass = this.isPasswordStrong(password);
|
||||||
|
|
||||||
if (!checkPass) {
|
if (!checkPass) {
|
||||||
throw new OverflowException("PasswordNotStrongException()", new Throwable());
|
throw new OverflowException("PasswordNotStrongException()", new Throwable());
|
||||||
|
@ -202,7 +202,7 @@ public class CentralMemberService implements MemberService {
|
||||||
|
|
||||||
Boolean match = passwordEncoder.matches(member.getPassword(), preMember.getPassword());
|
Boolean match = passwordEncoder.matches(member.getPassword(), preMember.getPassword());
|
||||||
if (!match) {
|
if (!match) {
|
||||||
member.setPassword(passwordEncoder.encode(pw));
|
member.setPassword(passwordEncoder.encode(password));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
member.setPassword(preMember.getPassword());
|
member.setPassword(preMember.getPassword());
|
||||||
|
@ -232,14 +232,14 @@ public class CentralMemberService implements MemberService {
|
||||||
return preMember;
|
return preMember;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Member forgotPassword(String signinId, String newPw) throws OverflowException {
|
public Member forgotPassword(String signinId, String newPassword) throws OverflowException {
|
||||||
Member preMember = this.memberDAO.findByEmail(signinId);
|
Member preMember = this.memberDAO.findByEmail(signinId);
|
||||||
|
|
||||||
if (null == preMember) {
|
if (null == preMember) {
|
||||||
throw new OverflowException("SignInIdNotExistException()", new Throwable());
|
throw new OverflowException("SignInIdNotExistException()", new Throwable());
|
||||||
}
|
}
|
||||||
|
|
||||||
Member cMember = this.modify(preMember, newPw);
|
Member cMember = this.modify(preMember, newPassword);
|
||||||
|
|
||||||
return cMember;
|
return cMember;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user