model change

This commit is contained in:
insanity 2018-04-24 19:30:09 +09:00
parent 2a30b37875
commit 7df5c1458a
6 changed files with 33 additions and 31 deletions

View File

@ -5,7 +5,6 @@ import com.loafle.overflow.central.commons.utils.EmailSender;
import com.loafle.overflow.central.commons.utils.SessionMetadata;
import com.loafle.overflow.central.module.email.service.EmailAuthService;
import com.loafle.overflow.central.module.member.dao.MemberDAO;
import com.loafle.overflow.central.module.member.exception.*;
import com.loafle.overflow.core.exception.OverflowException;
import com.loafle.overflow.model.apikey.ApiKey;
@ -129,7 +128,7 @@ public class CentralMemberService implements MemberService {
try {
this.emailAuthService.sendEmailResetPassword(member);
} catch (MailException e) {
} catch (Exception e) {
// Todo ReSend Mail
e.printStackTrace();
}
@ -150,7 +149,7 @@ public class CentralMemberService implements MemberService {
Member member = this.memberDAO.findByEmail(deEmail);
if (null == member) {
throw new SignInIdNotExistException();
throw new OverflowException("", null);
}
boolean checkPass = this.isPasswordStrong(pw);

View File

@ -87,10 +87,8 @@ public class CentralMemberTotpService implements MemberTotpService {
String secret = key.getKey();
// List<Integer> scratchCodes = key.getScratchCodes();
// String otpAuthURL = GoogleAuthenticatorQRGenerator.getOtpAuthURL("overFlow", member.getEmail(), key);
URIBuilder uri = (new URIBuilder()).setScheme("otpauth")
.setHost("totp")
.setPath("/" + formatLabel("overFlow", member.getEmail()))
.setParameter("secret", key.getKey());
URIBuilder uri = (new URIBuilder()).setScheme("otpauth").setHost("totp")
.setPath("/" + formatLabel("overFlow", member.getEmail())).setParameter("secret", key.getKey());
returnMap.put("key", secret);
returnMap.put("uri", uri.toString());

View File

@ -20,15 +20,12 @@ import com.loafle.overflow.service.central.domain.DomainMemberService;
import com.loafle.overflow.service.central.noauthprobe.NoAuthProbeService;
import com.loafle.overflow.service.central.probe.ProbeService;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.type.TypeReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

View File

@ -1,6 +1,12 @@
package com.loafle.overflow.central.module.target.service;
import com.loafle.overflow.central.module.infra.service.*;
import com.loafle.overflow.model.infra.InfraService;
import com.loafle.overflow.service.central.infra.InfraHostService;
import com.loafle.overflow.service.central.infra.InfraMachineService;
import com.loafle.overflow.service.central.infra.InfraOSPortService;
import com.loafle.overflow.service.central.infra.InfraOSService;
import com.loafle.overflow.service.central.infra.InfraServiceService;
import com.loafle.overflow.service.central.target.TargetService;
import org.springframework.beans.factory.annotation.Autowired;
@ -25,7 +31,7 @@ public class TargetDiscoveryService {
private InfraHostService infraHostService;
@Autowired
private com.loafle.overflow.central.module.infra.service.InfraService infraService;
private InfraService infraService;
@Autowired
private InfraOSPortService infraOSPortService;

View File

@ -1,10 +1,10 @@
package com.loafle.overflow.central.module.member.service;
import com.loafle.overflow.central.module.domain.model.Domain;
import com.loafle.overflow.central.module.member.model.Member;
import com.loafle.overflow.central.module.member.model.MemberTotp;
import com.loafle.overflow.central.module.meta.model.MetaMemberStatus;
import com.loafle.overflow.central.spring.AppConfigTest;
import com.loafle.overflow.model.member.Member;
import com.loafle.overflow.service.central.member.MemberService;
import com.loafle.overflow.service.central.member.MemberTotpService;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

View File

@ -1,8 +1,10 @@
package com.loafle.overflow.central.module.member.service;
import com.loafle.overflow.central.module.member.model.Member;
import com.loafle.overflow.central.module.member.model.MemberTotp;
import com.loafle.overflow.central.spring.AppConfigTest;
import com.loafle.overflow.model.member.Member;
import com.loafle.overflow.model.member.MemberTotp;
import com.loafle.overflow.service.central.member.MemberTotpService;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;