首页  :: 新随笔  :: 管理

cas 3.2不使用https 只使用http协议配置

Posted on 2011-08-12 18:13  季枫  阅读(2694)  评论(2)    收藏  举报

修改cas Server端:

/WebRoot/WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xml 文件:

<bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
  p:cookieSecure
="true"     //默认为true,使用https,如果只需要http,修改为false即可
  p:cookieMaxAge
="-1"
  p:cookieName
="CASTGC"
  p:cookiePath
="/cas" />

 

 第二个要修改的地方:

修改deployerConfigContext.xml文件,在authenticationHandlers属性中

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

这个文件增加属性 p:requireSecure="false"

 

如果不修改deployerConfigContext.xml会报错误:

TicketCreationException: error.authentication.credentials.bad

 

智读 | 成都会领科技有限公司官网 | 智读App下载 | 每天听本书的博客 | |