Hi All, does anybody know how to execute code directly after the webcontainer authenticates an user using form-based JAAS-login? Among other duties I inted to log (i.e. to create a log entry) every login attempt into the database. Because the webcontainer handles the authentication automatically there is no way to get called from the framework.
There where two attempts I've done: 1. Writing a web-filter. 2. Writing a custom LoginModule. The precondition for the first attempt is that the task handling the request "j_security_check" has also to be a filter. This is not the case. "j_security_check" runs completely isolated. For the second attempt I wrote: | public class LoggedDatabaseServerLoginModule extends DatabaseServerLoginModule{ | public boolean login() throws LoginException { | boolean loginResult = super.login(); | if ( loginResult == true) { | write_into_database("user logged in successfully"); | } else { | write_into_database("user logged in not successfully"); | } | | return loginResult; | } | } | Becaus of the caching mechanism of Jboss the login()-method gets called only once when the authentication cache will be filled with user information. For any further login attempt login() will not be called. So, where can code be placed that should be executed immediately after login? I am using the Jboss 3.2.1/Jetty bundle. Thanks, Gerd <a href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3827834#3827834">View the original post</a> <a href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3827834>Reply to the post</a> ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user