SEC-937: Added CAS logout filter to sample application

This commit is contained in:
Luke Taylor 2008-07-28 10:53:55 +00:00
parent 6b45eda37c
commit 6e06789a28
3 changed files with 37 additions and 8 deletions

View File

@ -8,7 +8,7 @@
<sec:http entry-point-ref="casProcessingFilterEntryPoint"> <sec:http entry-point-ref="casProcessingFilterEntryPoint">
<sec:intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR" requires-channel="https"/> <sec:intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR" requires-channel="https"/>
<sec:intercept-url pattern="/secure/**" access="ROLE_USER" /> <sec:intercept-url pattern="/secure/**" access="ROLE_USER" />
<sec:logout /> <sec:logout logout-success-url="/cas-logout.jsp"/>
</sec:http> </sec:http>
<sec:authentication-manager alias="authenticationManager"/> <sec:authentication-manager alias="authenticationManager"/>

View File

@ -27,11 +27,21 @@
<param-value>/WEB-INF/classes/log4j.properties</param-value> <param-value>/WEB-INF/classes/log4j.properties</param-value>
</context-param> </context-param>
<filter>
<filter-name>CAS Single Sign Out Filter</filter-name>
<filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
</filter>
<filter> <filter>
<filter-name>springSecurityFilterChain</filter-name> <filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter> </filter>
<filter-mapping>
<filter-name>CAS Single Sign Out Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping> <filter-mapping>
<filter-name>springSecurityFilterChain</filter-name> <filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern> <url-pattern>/*</url-pattern>
@ -42,6 +52,10 @@
- The application context is then available via - The application context is then available via
- WebApplicationContextUtils.getWebApplicationContext(servletContext). - WebApplicationContextUtils.getWebApplicationContext(servletContext).
--> -->
<listener>
<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
</listener>
<listener> <listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> </listener>

View File

@ -0,0 +1,15 @@
<html>
<head>
<title>Single-sign out?</title>
</head>
<body>
<h2>Do you want to log out of CAS?</h2>
<p>You have logged out of this application, but may still have an active single-sign on session with CAS.</p>
<p><a href="https://localhost:9443/cas/logout">Logout of CAS</a></p>
</body>
</html>