This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
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?
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.