cas(二)之http访问

  前面说过https://访问的话,如果没有申请证书的话,浏览器会认证网站是不安全网站,给用户不好影响,所以本次内容是将cas-server访问从https://转换成http://。

  • 更改deployerConfigContext.xm内容

  从源码拷贝一份deployerConfigContext.xml到cas-server的对应的目录中(没有目录的话新建目录),然后搜将p:requireSecure="true"修改为false,修改后如下

<bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
                    p:httpClient-ref="httpClient" p:requireSecure="false" />
  • 修改ticketGrantingTicketCookieGenerator.xml内容

  同样拷贝一份ticketGrantingTicketCookieGenerator.xml文件到cas-server对应目录,然后p:cookieSecure="true"修改为true,修改后如下

<bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
        p:cookieSecure="false"
        p:cookieMaxAge="-1"
        p:cookieName="CASTGC"
        p:cookiePath="/cas" />
  • 修改warnCookieGenerator.xml

  同样拷贝一份到case-server,修改warnCookieGenerator.xml中的p:cookieSecure="true"为false,修改后如下

<bean id="warnCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
        p:cookieSecure="false"
        p:cookieMaxAge="-1"
        p:cookieName="CASPRIVACY"
        p:cookiePath="/cas" />
  • 最后,完成修改后测试

  假设原来访问cas需要 https://localhost:443/访问cas,现在修改可以可以使用http://localhost:8080/来访问cas,https://中的443端口请参考前一篇文件中的

http://blog.csdn.net/frinder/article/details/7969925

 

posted @ 2017-05-15 16:28  風之殤  阅读(404)  评论(0)    收藏  举报