Index: ssts-web/src/main/webapp/WEB-INF/spring/security-standard/applicationContext-acegi-security.xml =================================================================== diff -u -r32540 -r33033 --- ssts-web/src/main/webapp/WEB-INF/spring/security-standard/applicationContext-acegi-security.xml (.../applicationContext-acegi-security.xml) (revision 32540) +++ ssts-web/src/main/webapp/WEB-INF/spring/security-standard/applicationContext-acegi-security.xml (.../applicationContext-acegi-security.xml) (revision 33033) @@ -49,6 +49,7 @@ + Index: ssts-web/src/main/webapp/casLogonSSO.jsp =================================================================== diff -u --- ssts-web/src/main/webapp/casLogonSSO.jsp (revision 0) +++ ssts-web/src/main/webapp/casLogonSSO.jsp (revision 33033) @@ -0,0 +1,199 @@ +<%@page import="java.util.HashMap"%> +<%@page import="java.util.Map"%> +<%@page import="com.forgon.security.model.User"%> +<%@page import="com.forgon.disinfectsystem.common.CssdUtils"%> +<%@page import="com.forgon.security.service.UserManager"%> +<%@ page contentType="text/html; charset=UTF-8" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@page import="com.forgon.tools.SpringBeanManger"%> +<%@page import="com.forgon.tools.Constants"%> +<%@page import="net.sf.json.JSONObject" %> +<%@page import="java.io.File" %> +<%@page import="java.util.ArrayList" %> +<%@page import="org.apache.commons.lang.StringUtils"%> +<%@page import="net.sf.json.JSONObject" %> +<%@ page import="org.jasig.cas.client.authentication.AttributePrincipal" %> +<%@page import="com.forgon.directory.model.LoginInfo"%> +<%@ include file="/common/taglibs.jsp" %> + +<% +ArrayList message = new ArrayList(); +String ticket = request.getParameter("ticket"); +String userName = ""; +String ctxx = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort(); +UserManager userManager=(UserManager)SpringBeanManger.getBean("userManager"); +if(StringUtils.isNotBlank(ticket) && StringUtils.isBlank(userName)){ + // 根据ticket获取用户信息 + String ticketUrl = "http://10.10.203.119:8081/Portal/serviceValidate"; + Map params = new HashMap(); + params.put("ticket", ticket); + String service = ctxx + "/casLogonSSO.jsp"; + params.put("service", service); + String result = CssdUtils.postRequest(ticketUrl, params, "utf-8"); + userName = CssdUtils.getXmlContentByTagName(result, "cas:user"); + if(StringUtils.isBlank(userName)){ + String xmlContent = CssdUtils.getXmlContentByTagName(result, "cas:authenticationFailure"); + message.add("登录失败"); + } +} + +if(StringUtils.isNotBlank(userName)){ + User user=userManager.getFirst("name", userName); + if(user==null){ + message.add("用户:"+userName+"不存在"); + }else{ + pageContext.setAttribute("barcode", user.getBarcode()); + } +} + +pageContext.setAttribute("message", message); + +String companyName = CssdUtils.getSystemSetConfigByName("companyName"); +String companyNameStr = ""; +if(companyName == null || companyName.equals("forgon")){ + companyNameStr = "©2021 广州孚峻信息技术有限公司 版权所有"; +}else if(companyName.equals("dingxiang")){ + companyNameStr = "©2021 广州丁香软件有限公司 版权所有"; +} +session.setAttribute("companyName", companyNameStr); +String project = CssdUtils.getConfigProperty("project"); +session.setAttribute("profile", project); + +String imgPath = "disinfectsystem/config/" + project + "/img/logo_" + project +".png"; +File file = new File(application.getRealPath("/") + imgPath); +if(file.exists()){ + request.setAttribute("logoPath",imgPath); +}else{ + if(companyName == null || companyName.equals("forgon")){ + request.setAttribute("logoPath","themes/portalPage/img/logo_Forgon.png"); + }else if(companyName.equals("dingxiang")){ + request.setAttribute("logoPath","themes/portalPage/img/logo_dingxiangsoft.png"); + } +} + +%> + + + + + + + + +消毒供应质量追溯管理系统 +<%-- --%> + + + + + + +
+
+
+ 账号或密码错误!请重新输入! + 验证码错误,请重新输入! + 该用户没有回收清点的权限,请重新输入! + 注册码不正确或试用期已过!请与管理人员联系! + 身份验证接口访问异常,请与系统管理员联系! +
+ + + +
+ + + + + + + + + +