how do i check for errors in spring - security?
I have an application that supports multiple types of login using username+password, using open id, etc.
Technology used : GWT. Login url = Login.html and Login Failure url = Login.html?error=true
as shown above, the login page (开发者_Go百科made in GWT) can determine that whether its just opened for first time or whether its opened after an error.
However, i am not able to determine the type of error a similar post here: Post link shows how to set the message to a custom one, But i require a programming approach: eg if open id login fails, I must show user a panel to enter his name, etc.
Is there any way to achieve this ?
For those not knowing GWT:
Let me change the problem a bit, suppose that my login page is not a JSP but a servlet, how do i write code in my servlet that is able to access the type of error occured during login? (Actually this does not solve the GWT issue, but it may give me a 'heads up' of what is needed to be done.)
Well you don't have to redirect your failed login to a jsp - it can be any URI. For instance you can redirect them to the URI http:/www.myserver.com/failed which is a completely different servlet (could be a servlet that does nothing but sends a redirect to a new URL even).
精彩评论