I’m casifying opencms with Java CAS Client, I have configured a simple
filter like the included in the source code. My problem is that when I
enable the filters, the non-ASCII chars aren’t send properly in OpenCms
workplace. Everything else works fine (cas login included).

 

Any suggestion? 

 

Thanks in advance.

 

 

This is my filter conf in web.xml:

 

    <!-- Start CAS Filtering -->

 

    <!--

       - Location of the XML file that defines the root application context

       - Applied by ContextLoaderListener.

       -->

    <context-param>

        <param-name>contextConfigLocation</param-name>

        <param-value>

 
/WEB-INF/classes/es/faffe/opencms/intranet/authentication/cas/simpleFilter.x
ml

        </param-value>

    </context-param>

 

    <filter>

        <filter-name>CAS Authentication Filter</filter-name>

 
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-c
lass>

        <init-param>

            <param-name>targetBeanName</param-name>

            <param-value>casAuthenticationFilter</param-value>

        </init-param>

    </filter>

 

    <filter>

        <filter-name>CAS Validation Filter</filter-name>

 
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-c
lass>

        <init-param>

            <param-name>targetBeanName</param-name>

            <param-value>casValidationFilter</param-value>

        </init-param>

    </filter>

 

    <filter>

        <filter-name>CAS HttpServletRequestWrapperFilter</filter-name>

 
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-c
lass>

        <init-param>

            <param-name>targetBeanName</param-name>

            <param-value>casHttpServletRequestWrapperFilter</param-value>

        </init-param>

    </filter>

 

    <filter-mapping>

        <filter-name>CAS Authentication Filter</filter-name>

        <url-pattern>/*</url-pattern>

    </filter-mapping>

 

    <filter-mapping>

        <filter-name>CAS Validation Filter</filter-name>

        <url-pattern>/*</url-pattern>

    </filter-mapping>

 

    <filter-mapping>

        <filter-name>CAS HttpServletRequestWrapperFilter</filter-name>

        <url-pattern>/*</url-pattern>

    </filter-mapping>

 

    <!--

      - Loads the root application context of this web app at startup.

      - The application context is then available via

      - WebApplicationContextUtils.getWebApplicationContext(servletContext).

    -->

    <listener>

 
<listener-class>org.springframework.web.context.ContextLoaderListener</liste
ner-class>

    </listener>

 

    <!--

    - Provides core MVC application controller. See contacts-servlet.xml.

    -->

    <servlet>

        <servlet-name>casclient</servlet-name>

 
<servlet-class>org.jasig.cas.client.proxy.SpringConfiguredProxyReceptorServl
et</servlet-class>

        <load-on-startup>1</load-on-startup>

    </servlet>

 

    <servlet-mapping>

        <servlet-name>casclient</servlet-name>

        <url-pattern>/proxy/Receptor</url-pattern>

    </servlet-mapping>

 

    <!-- End CAS Filtering -->

 

 

This is the content of my simpleFilter.xml:

 

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans";

       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

       xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd";>

 

    <bean id="propertyPlaceholderConfigurer"

 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigure
r">

        <property name="location"

 
value="/WEB-INF/classes/es/faffe/opencms/intranet/authentication/cas/cas-cli
ent.properties"/>

    </bean>

 

    <bean

            id="httpClient"

            class="org.jasig.cas.util.HttpClient3FactoryBean"/>

 

    <bean

            id="proxyRetriever"

            class="org.jasig.cas.client.proxy.Cas20ProxyRetriever">

        <constructor-arg index="0" value="${cas.server.url}"/>

        <constructor-arg index="1" ref="httpClient"/>

    </bean>

 

    <bean id="proxyGrantingTicketStorage"

 
class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl"/>

 

 

    <!-- final String casServerUrl, final boolean renew, final HttpClient
httpClient, final Service proxyCallbackUrl, List proxyChains, boolean
acceptAnyProxy, final ProxyGrantingTicketStorage proxyGrantingTicketStorage,
final ProxyRetriever proxyRetriever -->

    <bean

            id="ticketValidator"

 
class="org.jasig.cas.client.validation.Cas20ProxyTicketValidator">

        <constructor-arg index="0" value="${cas.server.url}"/>

        <constructor-arg index="1" value="${cas.server.renew}"/>

        <constructor-arg index="2" ref="httpClient"/>

        <constructor-arg index="3">

            <bean

 
class="org.jasig.cas.authentication.principal.SimpleService">

                <!-- proxyCallbackUrl: does nothing when using the
ServiceTicketValidator -->

                <constructor-arg value="${cas.client.proxyCallbackUrl}"/>

            </bean>

        </constructor-arg>

        <constructor-arg index="4">

            <list>

            </list>

        </constructor-arg>

        <constructor-arg index="5" value="true"/>

        <constructor-arg index="6" ref="proxyGrantingTicketStorage"/>

        <constructor-arg index="7" ref="proxyRetriever"/>

    </bean>

 

    <bean

            id="casHttpServletRequestWrapperFilter"

 
class="org.jasig.cas.client.web.filter.HttpServletRequestWrapperFilter"/>

 

    <bean

            id="casValidationFilter"

            class="org.jasig.cas.client.web.filter.TicketValidationFilter">

        <!-- serverName of client to construct serviceURL
eg:"thisServer.myDomain.net" -->

        <constructor-arg index="0" value="${cas.client.serverName}"/>

        <!-- serviceUrl of client: either provide serverName or serviceUrl
-->

        <constructor-arg index="1">

            <null/>

        </constructor-arg>

        <!-- ticketValidator implementation (defines protocol version to be
used) -->

        <constructor-arg index="2" ref="ticketValidator"/>

    </bean>

 

    <bean

            id="casAuthenticationFilter"

            class="org.jasig.cas.client.web.filter.AuthenticationFilter">

        <!-- serverName of client to construct serviceURL
eg:"thisServer.myDomain.net" -->

        <constructor-arg index="0" value="${cas.client.serverName}"/>

        <!-- serviceUrl of client: either provide serverName or serviceUrl
-->

        <constructor-arg index="1">

            <null/>

        </constructor-arg>

        <!-- CAS server loginUrl -->

        <constructor-arg index="2" value="${cas.server.url}login"/>

        <!-- renew? -->

        <constructor-arg index="3" value="${cas.server.renew}"/>

        <!-- gateway? -->

        <constructor-arg index="4" value="${cas.server.gateway}"/>

    </bean>

 

</beans>

_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to