CAS single point Logout

Source: Internet
Author: User
Tags cas

As a result of the project needs to achieve a single point of logout need to find on-line n long finally realized single point logout.

Using Cas-server-core-3.3.3.jar (CAS server 3.3.3)

Using Cas-client-core-3.1.3.jar (CAS client 3.1.3)

Project combined with CAS springsecurity SSH

Normal projects (without spring Security) can include the following code in Web. xml

[XHTML] view plain copy <filter> <filter-name>cas Single Sign Out filter</filter-name> <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class> </filter> <fi Lter-mapping> <filter-name>cas Single Sign out filter</filter-name> <url-pattern>/*</url -pattern> </filter-mapping> <listener> <listener-class> org.jasig.cas.client.se Ssion. Singlesignouthttpsessionlistener </listener-class> </listener>

In our project, thanks to the combination of springsecurity, you can add the filter to the spring security filter chain, or you can add it directly to the Web. xml

First, add the listener to Web. Xml.

[XHTML] view Plain copy <!--Single Sign out--<listener> <listener-class> Org.jasig.cas.client.session.SingleSignOutHttpSessionListener </listener-class> </listener> & lt;! -----

Then add the filter to the Spring security filter chain

[XHTML] view Plain Copy <!-----<b:bean id= "Cassinglesignoutfilter" class= "check. Singlesignoutfilter "> <custom-filter before=" cas_processing_filter "/> </b:bean> <!--single Si GN Out--

Note The above class= "check. Singlesignoutfilter "Is my custom filter (because the Singlesignoutfilter defined by CAS3.1.3 does not work in some sense) see http://www.javaeye.com/topic/546785

Define a class of your own

[Java] view plain copy package check;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.