论坛首页 Java企业应用论坛

让CAS支持HTTP协议认证

浏览 1535 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2011-09-27  

CAS默认使用HTTPS认证,在登录时使用HTTP方式也可以,但退出时必须使用HTTPS。如果要使用HTTP方式认证,需要修改2个配置文件

1.修改deployerConfigContext.xml中的authenticationHandlers,新增属性p:requireSecure="false"

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

 

2.修改ticketGrantingTicketCookieGenerator.xml,把p:cookieSecure="true",改为p:cookieSecure="false"

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

 

 
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics