H5去除APP版本校验
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.accompany.oauth2.support.password;
|
||||
|
||||
import com.accompany.common.constant.ApplicationConstant;
|
||||
import com.accompany.common.constant.Constant;
|
||||
import com.accompany.common.device.DeviceInfo;
|
||||
import com.accompany.common.redis.RedisKey;
|
||||
@@ -84,9 +85,12 @@ public class PasswordAuthenticationProvider implements AuthenticationProvider {
|
||||
loginTypeEnum = LoginTypeEnum.PASSWORD;
|
||||
}
|
||||
// 低于1.5版本不能进行登录
|
||||
String limitAppVersion = sysConfService.getDefaultSysConfValueById(Constant.SysConfId.APP_VERSION_LIMIT, Constant.LOWEST_VERSION_FOR_USE);
|
||||
if (deviceInfo.getAppVersion() == null || AppVersionUtil.compareVersion(deviceInfo.getAppVersion(), limitAppVersion) < 0) {
|
||||
throw new CustomOAuth2Exception(CustomOAuth2Exception.APP_VERSION_TOO_OLD, OAuthStatus.APP_VERSION_TOO_OLD.getReasonPhrase());
|
||||
String client = deviceInfo.getClient();
|
||||
if (!ApplicationConstant.PublicParameters.H5.equals(client)) {
|
||||
String limitAppVersion = sysConfService.getDefaultSysConfValueById(Constant.SysConfId.APP_VERSION_LIMIT, Constant.LOWEST_VERSION_FOR_USE);
|
||||
if (deviceInfo.getAppVersion() == null || AppVersionUtil.compareVersion(deviceInfo.getAppVersion(), limitAppVersion) < 0) {
|
||||
throw new CustomOAuth2Exception(CustomOAuth2Exception.APP_VERSION_TOO_OLD, OAuthStatus.APP_VERSION_TOO_OLD.getReasonPhrase());
|
||||
}
|
||||
}
|
||||
if (phoneBlackService.checkIsNeedIntercept(username)) {
|
||||
throw new CustomOAuth2Exception(CustomOAuth2Exception.PHONE_BE_INTERCEPTED,
|
||||
|
Reference in New Issue
Block a user