山西省城乡住房和建设厅网站,个人做盈利网站,深圳seo网站排名优化,软件开发工程师岗位说明文章目录一、部署cas1. 复制cas.war到webapps2. 登录页面二、CAS服务端配置2.1. 添加用户2.2. 端口修改2.3. 去除https认证一、部署cas
1. 复制cas.war到webapps
把cas.war放到tomcat的webapps下面启动Tomcat即可
2. 登录页面 二、CAS服务端配置
2.1. 添加用户
找到指定文…
文章目录一、部署cas1. 复制cas.war到webapps2. 登录页面二、CAS服务端配置2.1. 添加用户2.2. 端口修改2.3. 去除https认证一、部署cas
1. 复制cas.war到webapps
把cas.war放到tomcat的webapps下面启动Tomcat即可
2. 登录页面 二、CAS服务端配置
2.1. 添加用户
找到指定文件添加一行即可
bean idprimaryAuthenticationHandlerclassorg.jasig.cas.authentication.AcceptUsersAuthenticationHandlerproperty nameusersmapentry keycasuser valueMellon/entry keyadmin valueadmin//map/property/bean2.2. 端口修改
如果我们不希望用8080端口访问CAS, 可以修改端口
①修改TOMCAT的端口
打开tomcat 目录 conf\server.xml 找到下面的配置 Connector port8080 protocolHTTP/1.1connectionTimeout20000redirectPort8443 /修改为 Connector port9100 protocolHTTP/1.1connectionTimeout20000redirectPort8443 /将端口8080改为9100
②修改CAS配置文件
修改cas的WEB-INF/cas.properties 将8080修改为9100
server.namehttp://localhost:91002.3. 去除https认证
① 修改cas的WEB-INF/deployerConfigContext.xml
找到下面的配置 !-- Required for proxy ticket mechanism. --bean idproxyAuthenticationHandlerclassorg.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandlerp:httpClient-refhttpClient/修改后 !-- Required for proxy ticket mechanism. --bean idproxyAuthenticationHandlerclassorg.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandlerp:httpClient-refhttpClient p:requireSecurefalse/这里需要增加参数p:requireSecurefalserequireSecure属性意思为是否需要安全验证即HTTPSfalse为不采用
② 修改ticketGrantingTicketCookieGenerator.xml 修改cas的/WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xml 找到下面配置
bean idticketGrantingTicketCookieGenerator classorg.jasig.cas.web.support.CookieRetrievingCookieGeneratorp:cookieSecuretruep:cookieMaxAge-1p:cookieNameCASTGCp:cookiePath/cas /修改后配置
bean idticketGrantingTicketCookieGenerator classorg.jasig.cas.web.support.CookieRetrievingCookieGeneratorp:cookieSecurefalsep:cookieMaxAge3600p:cookieNameCASTGCp:cookiePath/cas /参数p:cookieSecuretrue同理为HTTPS验证相关TRUE为采用HTTPS验证FALSE为不采用https验证。
参数p:cookieMaxAge-1是COOKIE的最大生命周期-1为无生命周期即只在当前打开的窗口有效关闭或重新打开其它窗口仍会要求验证。可以根据需要修改为大于0的数字比如3600等意思是在3600秒内打开任意窗口都不需要验证。
我们这里将cookieSecure改为false , cookieMaxAge 改为3600③ 修改warnCookieGenerator.xml 修改cas的WEB-INF/spring-configuration/warnCookieGenerator.xml 找到下面配置我们这里将cookieSecure改为false , cookieMaxAge 改为3600
bean idwarnCookieGenerator classorg.jasig.cas.web.support.CookieRetrievingCookieGeneratorp:cookieSecuretruep:cookieMaxAge-1p:cookieNameCASPRIVACYp:cookiePath/cas /修改为
bean idwarnCookieGenerator classorg.jasig.cas.web.support.CookieRetrievingCookieGeneratorp:cookieSecurefalse p:cookieMaxAge3600p:cookieNameCASPRIVACYp:cookiePath/cas /启用http协议关闭HTTPS协议