`

让CAS支持HTTP协议认证

    博客分类:
  • cas
阅读更多

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" />
 

 

 
分享到:
评论
2 楼 eshore 2011-11-06  
请问博主,是否必须https才能退出?这样没证书的不就郁闷了,只能用自制的小垃圾证书凑合着?
1 楼 zywang 2011-10-11  
我们现在用的时候只修改了第二步,没有你的那个第一步,也可以用啊,请问你为什么做第一步的操作?

相关推荐

Global site tag (gtag.js) - Google Analytics