|
@@ -7,6 +7,7 @@ import com.bosshand.virgo.core.model.MgrUser;
|
|
|
import com.bosshand.virgo.core.response.Response;
|
|
|
import com.bosshand.virgo.core.service.MgrUserService;
|
|
|
import com.bosshand.virgo.core.utils.CodeCache;
|
|
|
+import com.bosshand.virgo.core.utils.SecurityUtils;
|
|
|
import com.bosshand.virgo.exception.AuthException;
|
|
|
import com.bosshand.virgo.exception.Constant;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
@@ -110,6 +111,12 @@ public class VirgoAuthenticationFilter extends AuthenticatingFilter {
|
|
|
return createToken(dto.getPhone(), CodeCache.DefaultPhoneCode, request, response);
|
|
|
}
|
|
|
|
|
|
+ // 密码登录
|
|
|
+ if(dto.getPassword() != null){
|
|
|
+ String password = SecurityUtils.MD5LoginSecu(dto.getPassword().getBytes());
|
|
|
+ return createToken(dto.getPhone(), password, request, response);
|
|
|
+ }
|
|
|
+
|
|
|
// 手机号验证码注册登录
|
|
|
phoneCode = CodeCache.getKey(dto.getPhone());
|
|
|
if (!dto.getPhoneCode().equals(phoneCode)) {
|