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

修改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

原文地址:https://www.cnblogs.com/jifeng/p/2136609.html