Results 1 to 2 of 2

Thread: extending AuthenticationProcessingFilter

  1. #1
    Join Date
    Feb 2008
    Posts
    4

    Default extending AuthenticationProcessingFilter

    In my login page user has to enter 3 fields to login to the app

    I am thinking of extending AutheticationProcessingFilter , extend the UserNamePasswordToken which has 3 values and extend Provider Manager to accept the new token

    Is it the right way to do it?

    If we set auto-config=true and use the below as specified in the docs
    <beans:bean id="myFilter" class="com.mycompany.MySpecialAuthenticationFilter ">
    <custom-filter position="AUTHENTICATION_PROCESSING_FILTER"/>
    </beans:bean>

    How do I use the properties that were used by the framework in my filter without configuring?

    If I give exactly the above specified in the docs, it is not able to instantiate the bean beacuse it is missing properties like defaultTargetURL

    Thanks

  2. #2
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    You'll find logging in with extra information in the FAQ:

    http://static.springframework.org/sp.../site/faq.html

    so this is a valid approach, apart from extending ProviderManager - you would implement a custom authentication provider.

    Obviously you have to code a valid filter and if you extend AuthenticationProcessingFilter then you have to set the required properties.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •