Load AutoIntegrationFilter via FilterToBeanProxy.
This commit is contained in:
parent
0c43fe1f4a
commit
fa396c6cdf
|
@ -1856,7 +1856,11 @@ public boolean supports(Class clazz);</programlisting></para>
|
|||
|
||||
<para><programlisting><filter>
|
||||
<filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
|
||||
<filter-class>net.sf.acegisecurity.ui.AutoIntegrationFilter</filter-class>
|
||||
<filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
|
||||
<init-param>
|
||||
<param-name>targetClass</param-name>
|
||||
<param-value>net.sf.acegisecurity.ui.AutoIntegrationFilter</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
|
@ -1864,6 +1868,11 @@ public boolean supports(Class clazz);</programlisting></para>
|
|||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping></programlisting></para>
|
||||
|
||||
<para>You will also need to add the following line to your application
|
||||
context:</para>
|
||||
|
||||
<para><programlisting><bean id="autoIntegrationFilter" class="net.sf.acegisecurity.ui.AutoIntegrationFilter" /></programlisting></para>
|
||||
|
||||
<para>Once in the <literal>ContextHolder</literal>, the standard Acegi
|
||||
Security System for Spring classes can be used. Because
|
||||
<literal>ContextHolder</literal> is a standard object which is
|
||||
|
|
|
@ -59,6 +59,8 @@
|
|||
<property name="realmName"><value>Contacts Realm</value></property>
|
||||
</bean>
|
||||
|
||||
<bean id="autoIntegrationFilter" class="net.sf.acegisecurity.ui.AutoIntegrationFilter" />
|
||||
|
||||
<!-- ~~~~~~~~~~~~~~~~~~~~ AUTHORIZATION DEFINITIONS ~~~~~~~~~~~~~~~~~~~ -->
|
||||
|
||||
<!-- An access decision voter that reads ROLE_* configuaration settings -->
|
||||
|
|
|
@ -35,7 +35,11 @@
|
|||
|
||||
<filter>
|
||||
<filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
|
||||
<filter-class>net.sf.acegisecurity.ui.AutoIntegrationFilter</filter-class>
|
||||
<filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
|
||||
<init-param>
|
||||
<param-name>targetClass</param-name>
|
||||
<param-value>net.sf.acegisecurity.ui.AutoIntegrationFilter</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
<property name="realmName"><value>Contacts Realm</value></property>
|
||||
</bean>
|
||||
|
||||
<bean id="autoIntegrationFilter" class="net.sf.acegisecurity.ui.AutoIntegrationFilter" />
|
||||
|
||||
<bean id="casAuthenticationProvider" class="net.sf.acegisecurity.providers.cas.CasAuthenticationProvider">
|
||||
<property name="casAuthoritiesPopulator"><ref bean="casAuthoritiesPopulator"/></property>
|
||||
<property name="casProxyDecider"><ref bean="casProxyDecider"/></property>
|
||||
|
|
|
@ -62,7 +62,11 @@
|
|||
|
||||
<filter>
|
||||
<filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
|
||||
<filter-class>net.sf.acegisecurity.ui.AutoIntegrationFilter</filter-class>
|
||||
<filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
|
||||
<init-param>
|
||||
<param-name>targetClass</param-name>
|
||||
<param-value>net.sf.acegisecurity.ui.AutoIntegrationFilter</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
|
|
|
@ -70,6 +70,8 @@
|
|||
<property name="realmName"><value>Contacts Realm</value></property>
|
||||
</bean>
|
||||
|
||||
<bean id="autoIntegrationFilter" class="net.sf.acegisecurity.ui.AutoIntegrationFilter" />
|
||||
|
||||
<!-- ~~~~~~~~~~~~~~~~~~~~ AUTHORIZATION DEFINITIONS ~~~~~~~~~~~~~~~~~~~ -->
|
||||
|
||||
<!-- An access decision voter that reads ROLE_* configuaration settings -->
|
||||
|
|
|
@ -53,7 +53,11 @@
|
|||
|
||||
<filter>
|
||||
<filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
|
||||
<filter-class>net.sf.acegisecurity.ui.AutoIntegrationFilter</filter-class>
|
||||
<filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
|
||||
<init-param>
|
||||
<param-name>targetClass</param-name>
|
||||
<param-value>net.sf.acegisecurity.ui.AutoIntegrationFilter</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
|
|
|
@ -88,4 +88,6 @@
|
|||
<property name="forceHttps"><value>false</value></property>
|
||||
</bean>
|
||||
|
||||
<bean id="autoIntegrationFilter" class="net.sf.acegisecurity.ui.AutoIntegrationFilter" />
|
||||
|
||||
</beans>
|
||||
|
|
|
@ -26,7 +26,11 @@
|
|||
|
||||
<filter>
|
||||
<filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
|
||||
<filter-class>net.sf.acegisecurity.ui.AutoIntegrationFilter</filter-class>
|
||||
<filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
|
||||
<init-param>
|
||||
<param-name>targetClass</param-name>
|
||||
<param-value>net.sf.acegisecurity.ui.AutoIntegrationFilter</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
|
|
|
@ -47,4 +47,24 @@ applications:
|
|||
changed. Most CAS users will be using DaoCasAuthoritiesPopulator, so this
|
||||
change is unlikely to require any action.
|
||||
|
||||
- Please check your web.xml for whether you are using AutoIntegrationFilter.
|
||||
Previously this class was loaded directly by web.xml as a filter. It is
|
||||
now recommended to load it via FilterToBeanProxy and define it as a
|
||||
bean in your application context. This usually involves making the entry
|
||||
in web.xml match the following:
|
||||
|
||||
<filter>
|
||||
<filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
|
||||
<filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
|
||||
<init-param>
|
||||
<param-name>targetClass</param-name>
|
||||
<param-value>net.sf.acegisecurity.ui.AutoIntegrationFilter</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
Then add the following to applicationContext.xml:
|
||||
|
||||
<bean id="autoIntegrationFilter" class="net.sf.acegisecurity.ui.AutoIntegrationFilter" />
|
||||
|
||||
|
||||
$Id$
|
||||
|
|
Loading…
Reference in New Issue