Jun 10th, 2010, 05:09 AM
No useful, please try another one.
Last edited by ricca; Nov 25th, 2010 at 08:50 PM.
Jun 10th, 2010, 05:30 AM
I don't really understand what you mean. Why would it be better to throw different exceptions?
Also, you don't normally need to override or implement an AuthenticationManager when using Spring Security.
Jun 10th, 2010, 06:24 AM
If you have different login checks in your application then you can throw different exceptions, but I'm still not clear what you need them for. What are you actually trying to achieve - i.e. what's the requirement driving this?
Jun 10th, 2010, 07:57 AM
If you are customizing the authentication checks then you have full control over what exception is thrown. It should just be a subclass of AuthenticationException. You can control the redirection by implementing an AuthenticationFailureHandler which chooses the location based on the exception type.