Spring Security 3.0 – Part 5
Posted by Pankil Patel on April 30, 2010
How to Handle Authentication Fail when we are using “Custom EntryPoint” or “Custom authenticationProcessingFilter” or ” Custom UsernamePasswordAuthenticationFilter” in Spring Security 3.0?
Step 1:
Add new bean entry of “authenticationFailureHandler” into your “applicationContext-security.xml” file like:
Here languageProcessingFilter is the same as explained in post Spring Security 3 .0 – Part 3.
Step 2:
Create your new class “AuthenticationFailHandler” Which will implements “org.springframework.security.web.authentication.AuthenticationFailureHandler” Like:
That’s it for Authentication Fail Handling……
Hureeeeeeeeeeee Ready to use Customized spring Security 3.0. with Authentication Fail Handling.
BEST OF LUCK
Leave a comment