Announcement Announcement Module
Collapse
No announcement yet.
Cannot get BasicProcessingFilter to work Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot get BasicProcessingFilter to work

    I have tried implement a BasicProcessingFilter for my webApp. But it doesn't seem to do anything. Am I missing something?

    I have added the following to my web.xml

    <filter>
    <filter-name>authenticationFilter</filter-name>
    <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
    <init-param>
    <param-name>targetBean</param-name>
    <param-value>basicProcessingFilter</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>authenticationFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>

    and the following beans to my application context:

    <bean id="authenticationManager" class="net.sf.acegisecurity.providers.ProviderMana ger">
    <property name="providers">
    <list>
    <ref bean="daoAuthenticationProvider"/>
    </list>
    </property>
    </bean>

    <bean id="daoAuthenticationProvider" class="net.sf.acegisecurity.providers.dao.DaoAuthe nticationProvider">
    <property name="authenticationDao"><ref bean="inMemoryDaoImpl"/></property>
    </bean>

    <bean id="inMemoryDaoImpl" class="net.sf.acegisecurity.providers.dao.memory.I nMemoryDaoImpl">
    <property name="userMap">
    <value>
    admin=quality,ROLE_ADMINISTRATOR, ROLE_SETUP
    </value>
    </property>
    </bean>

    <bean id="basicProcessingFilter" class="net.sf.acegisecurity.ui.basicauth.BasicProc essingFilter">
    <property name="authenticationManager"><ref bean="authenticationManager"/></property>
    <property name="authenticationEntryPoint"><ref bean="authenticationEntryPoint"/></property>
    </bean>

    <bean id="authenticationEntryPoint" class="net.sf.acegisecurity.ui.basicauth.BasicProc essingFilterEntryPoint">
    <property name="realmName"><value>Timestock Administration and Setup</value></property>
    </bean>

  • #2
    Try using FilterChainProxy as per the Contacts Filter Sample instead of just adding the BasicProcessingFilter to web.xml. If that doesn't work, please post your FilterChainProxy bean configuration and DEBUG logs of what happens when you present BASIC authentication requests to the application.

    Comment

    Working...
    X