0 Replies Latest reply on Sep 30, 2011 10:31 AM by jonisbishop

    Custom LoginModule doesn't call login() on subsiquent logins

    jonisbishop

      Problem

      I'm using JBoss 4.0.5GA with a custom LoginModule that extends org.jboss.security.auth.spi.DatabaseServerLoginModule.  It works great for the first login. However, if I login with the same username on a different session (on a different machine), the login() or initialize() method never gets called.  At this point I've been looking though the JAAS documentation to see if this is an expected behavior. There are several things that lead to to believe that it is not. for example, I have Session A logged in for user FOO, I start Session B, login as user FOO (LoginModule isn't called). I logout B.FOO then login B.FOO again and the LoginModule is now called.

       

      So My questions are:

      1) Is this an expected behavior?

      2) Is there a workaround?

       

       

      What I'm trying to do:

      I'm trying to keep track of the number of logins regardless of how they login. I have a jsp page using FORM based login and flex based authentication using the flex.messaging.security.TomcatValve via channel authentication.