This looks like a spring issue, not a CAS issue.  It looks like spring is
trying to use a different constructor for LogoutFilter than the one that you
are intending to use.  The two constructors are
http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/s
pringframework/security/web/authentication/logout/LogoutFilter.html#construc
tor_summary

 


 
<http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/
springframework/security/web/authentication/logout/LogoutFilter.html#LogoutF
ilter(org.springframework.security.web.authentication.logout.LogoutSuccessHa
ndler,
org.springframework.security.web.authentication.logout.LogoutHandler...)>
LogoutFilter(
<http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/
springframework/security/web/authentication/logout/LogoutSuccessHandler.html
> LogoutSuccessHandler logoutSuccessHandler,
<http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/
springframework/security/web/authentication/logout/LogoutHandler.html>
LogoutHandler... handlers) 
          Constructor which takes a LogoutSuccessHandler instance to
determine the target destination after logging out.


 
<http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/
springframework/security/web/authentication/logout/LogoutFilter.html#LogoutF
ilter(java.lang.String,
org.springframework.security.web.authentication.logout.LogoutHandler...)>
LogoutFilter(
<http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-exter
nal=true> String logoutSuccessUrl,
<http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/
springframework/security/web/authentication/logout/LogoutHandler.html>
LogoutHandler... handlers) 

 

It looks like spring is picking the first constructor which wants a
"LogoutSuccessHandler" as the first argument, while you are looking for the
second one which has a String as the first argument.

 

Perhaps try explicity listing the types of the each of the contructor
arguments as shown on this wiki page in order to help spring find the right
contructor:
http://www.mkyong.com/spring/constructor-injection-type-ambiguities-in-sprin
g/

 

So something like this (I didn't verify the syntax):

 

    <bean id="casSingleSignOutFilter"
class="org.jasig.cas.client.session.SingleSignOutFilter"/>
    <!-- This filter redirects to the CAS Server to signal Single Logout
should be performed -->
    <bean id="requestSingleLogoutFilter"
 
class="org.springframework.security.web.authentication.logout.LogoutFilter">

        <constructor-arg type="java.lang.String">

            <value>="${cas.server}/cas/logout</value>

        </constructor-arg>

        <constructor-arg
type="org.springframework.security.web.authentication.logout.LogoutHandler">
            <bean
class="org.springframework.security.web.authentication.logout.SecurityContex
tLogoutHandler"/>
        </constructor-arg>
        <property name="filterProcessesUrl"
value="/j_spring_cas_security_logout"/>
    </bean>

 

David Ohsie

Software Architect

EMC Corporation

 

 

 

From: Andrew Chandler [mailto:[email protected]] 
Sent: Wednesday, April 17, 2013 5:38 PM
To: [email protected]
Subject: [cas-user] Troubles with Single Sign Out

 

I'm hoping someone can see what I'm messing up.    We have 3 webapps (and
I'd swear this was working before) - We use one as sort of a portal for
containing the othere 2.   They all are on the same tomcat instance.   Most
things are working ok but single signout stopped working (I'd swear it was
working a week or two ago.)



This is the error I'm getting:
16:33:44,193 TRACE DefaultListableBeanFactory:201 - Ignoring constructor
[public
org.springframework.security.web.authentication.logout.LogoutFilter(org.spri
ngframework.security.web.authentication.logout.LogoutSuccessHandler,org.spri
ngframework.security.web.authentication.logout.LogoutHandler[])] of bean
'requestSingleLogoutFilter':
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'requestSingleLogoutFilter' defined in class path
resource [spring-security-context.xml]: Unsatisfied dependency expressed
through constructor argument with index 0 of type
[org.springframework.security.web.authentication.logout.LogoutSuccessHandler
]: Could not convert constructor argument value of type [java.lang.String]
to required type
[org.springframework.security.web.authentication.logout.LogoutSuccessHandler
]: Failed to convert value of type 'java.lang.String' to required type
'org.springframework.security.web.authentication.logout.LogoutSuccessHandler
'; nested exception is java.lang.IllegalStateException: Cannot convert value
of type [java.lang.String] to required type
[org.springframework.security.web.authentication.logout.LogoutSuccessHandler
]: no matching editors or conversion strategy found
16:33:44,194 DEBUG StandardServletEnvironment:112 - Initializing new
StandardServletEnvironment
16:33:44,194 DEBUG StandardServletEnvironment:107 - Adding
[servletConfigInitParams] PropertySource with lowest search precedence





This is the spring-security-context.xml portions I'm using.   We've tried to
not put too much in web.xml preferring either code or spring xml entries.

   <bean id="casSingleSignOutFilter"
class="org.jasig.cas.client.session.SingleSignOutFilter"/>
    <!-- This filter redirects to the CAS Server to signal Single Logout
should be performed -->
    <bean id="requestSingleLogoutFilter"
 
class="org.springframework.security.web.authentication.logout.LogoutFilter">
        <constructor-arg value="${cas.server}/cas/logout"/>
        <constructor-arg>
            <bean
class="org.springframework.security.web.authentication.logout.SecurityContex
tLogoutHandler"/>
        </constructor-arg>
        <property name="filterProcessesUrl"
value="/j_spring_cas_security_logout"/>
    </bean>

 

-- 
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to