|
|
|
@ -115,9 +115,6 @@ public class WebController { |
|
|
|
|
@Autowired |
|
|
|
|
private OATokenService oaTokenService; |
|
|
|
|
|
|
|
|
|
@Value("${oauth.whitelist}") |
|
|
|
|
private String whitelist; |
|
|
|
|
|
|
|
|
|
private Set<String> urlSet = new HashSet<String>(); |
|
|
|
|
|
|
|
|
|
private final String firCount = "1"; |
|
|
|
@ -224,6 +221,11 @@ public class WebController { |
|
|
|
|
response.sendRedirect(url); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping("/sso/singleLogin") |
|
|
|
|
public void singleLogin(HttpServletResponse response) throws IOException { |
|
|
|
|
response.sendRedirect(itaxAdminConfig.getLxOauth()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping("/singleLogin") |
|
|
|
|
public void reOA(@RequestParam Map<String,Object> params,HttpServletResponse response) throws IOException { |
|
|
|
|
Object code = params.get("code"); |
|
|
|
@ -389,6 +391,14 @@ public class WebController { |
|
|
|
|
@RequestBody LoginModel loginModel) { |
|
|
|
|
String username = loginModel.getDxhyu(); |
|
|
|
|
log.info("用户{},登录开始", username); |
|
|
|
|
|
|
|
|
|
String name = AESUtil.aesDecrypt(username); |
|
|
|
|
log.info("用户{},解密后用户名是{}", username, name); |
|
|
|
|
if (StringUtils.isBlank(itaxAdminConfig.getWhitelist()) || !Arrays.asList(itaxAdminConfig.getWhitelist()).contains(name)){ |
|
|
|
|
log.info("用户{},登录失败,未配置白名单", name); |
|
|
|
|
return new ReturnT<String>(FAIL_CODE, "请使用统一认证方式登陆,临时使用请联系管理员开通白名单"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
boolean ifRem = (loginModel.getIfRemember() != null && "on".equals(loginModel.getIfRemember())) ? true : false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -636,9 +646,9 @@ public class WebController { |
|
|
|
|
if (xxlUser == null) { |
|
|
|
|
returnT = Result.error(11001, "未登录"); |
|
|
|
|
if(ConfigureConstant.STRING_1.equals(itaxAdminConfig.userCenterType())){ |
|
|
|
|
returnT.put("redirectUrl",itaxAdminConfig.getRedirectUrl()); |
|
|
|
|
returnT.put("redirectUrl",itaxAdminConfig.getLxOauth()); |
|
|
|
|
}else { |
|
|
|
|
returnT.put("redirectUrl",itaxAdminConfig.getOmpRedirectUrl()); |
|
|
|
|
returnT.put("redirectUrl",itaxAdminConfig.getLxOauth()); |
|
|
|
|
} |
|
|
|
|
return returnT; |
|
|
|
|
} else { |
|
|
|
|