您的位置:首页 > 理论基础 > 计算机网络

CAS取消https方法配置

2016-09-28 17:01 267 查看
cas的https部署方式很复杂,所以如果安全性要求不高,就进行http部署,参考如下:

详细配置修改如下:

1、WEB-INF/deployerConfigContext.xml

    在

    < bean class = "org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"     p:httpClient-ref = "httpClient" />

增加参数 p:requireSecure="false" ,是否需要安全验证,即 HTTPS , false 为不采用 如下:

< bean class = "org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" p:httpClient-ref = "httpClient" p:requireSecure= "false" />

      

2 、 WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xml 

         修改 p:cookieSecure="true" 为 p:cookieSecure=" false " , 即不需要安全 cookie

如下部分:

    < bean id = "ticketGrantingTicketCookieGenerator" class = "org.jasig.cas.web.support.CookieRetrievingCookieGenerator"

       p:cookieSecure = " false "

       p:cookieMaxAge = "-1"

       p:cookieName = "CASTGC"

       p:cookiePath = "/cas" />

 

3 、 WEB-INF\spring-configuration\warnCookieGenerator.xml

修改 p:cookieSecure="true" 为 p:cookieSecure=" false " , 即不需要安全 cookie

结果如下:

    < bean id = "warnCookieGenerator" class = "org.jasig.cas.web.support.CookieRetrievingCookieGenerator"

       p:cookieSecure = " false "

       p:cookieMaxAge = "-1"

       p:cookieName = "CASPRIVACY"

       p:cookiePath = "/cas" />

另:CAS4.0以后默认用户名密码已经变为:casuser Mellon

原文转自:http://blog.csdn.net/zhurhyme/article/details/24052951
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  cas http https 部署 配置