八、cas 4.2.x 单点登出

9 篇文章 2 订阅

上一篇是cas配置shiro,这次说一说单点登出.特别感谢 白夜船长大神 !

 

cas配置shiro:http://blog.csdn.net/mr_yangzc/article/details/69396622

依然给出官方文档,https://apereo.github.io/cas/4.2.x/installation/Logout-Single-Signout.html

 

单点登出非常简单  在client web.xml中配置

<!-- 单点登出 -->
    <listener>
        <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
    </listener>
    <filter>
        <filter-name>CAS Single Sign Out Filter</filter-name>
        <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>CAS Single Sign Out Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>


这里也许会有人在项目启动时候报错:

java.lang.IllegalArgumentException: casServerUrlPrefix cannot be null.

原因也非常简单,jar包版本不对 解决方法:

 

 

 

在 cas server   中的 cas.properties中进行配置:

 

# Specify whether CAS should redirect to the specified service parameter on /logout requests
# cas.logout.followServiceRedirects=false
cas.logout.followServiceRedirects=true

 

##
# Single Logout Out Callbacks
#
# To turn off all back channel SLO requests set this to true
# slo.callbacks.disabled=false

 slo.callbacks.disabled=false

 


#
# To send callbacks to endpoints synchronously, set this to false
# slo.callbacks.asynchronous=true
slo.callbacks.asynchronous=true

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值