I'm using Apache Geronimo as my application server. And authentication is happening over LDAP using Apache Directory Service. I don't have any previous experience with JavaEE software development, so please take it easy on me. Let me know if I need to explain anything in more detail.
Basically my login step is pretty similar to this example from the geronimo documentation: https://cwiki.apache.org/GMOxDOC22/ldap-sample-app-ldap-sample-application.html
There are three different behaviors that are happening when a user is trying to login:
When a user logs in with the correct username, which is in the correct ldap group, they are taken to a secure area of the site. And I'm not sure how to log the user out of the site until their session ends.
When a user logs in with a username/password that isn't in the LDAP directory, the user is redirected to /auth/logonError.html?param=test (this location is specified in in 'web.xml')
When a user logs in with a correct username/password that is not in the appropriate group, they are redirected to a "HTTP 403 forbidden page". There is an example of this page at the bottom of the ldap sample. The behavior should be the same as an unauthenticated user.
In all of these cases, there is no way for the user to retry the login process until the browser is restarted or a different browser is used. This is the big problem that I am having.
I would like the following scenarios to happen.
A properly authenticated user can logout, and try to login again.
A improperly authenticated user is redirected to the login screen, and told to try again.
What do I need to do to make this happen? Thanks for your help.