7 Replies Latest reply on Feb 10, 2008 7:02 PM by Shane Bryzak

    EVENT_LOGIN_SUCCESSFUL handled twice

    Fijai Cairo Newbie

      I just upgraded to 2.0.1GA and overrode facesSecurityEvents. addLoginSuccessfulMessage() which used to be in identity so I could suppress the "Welcome, user" message.

      From my logs, I can tell authenticator.authenticate is only being called once but addLoginSuccessfulMessage(), the event handler for EVENT_LOGIN_SUCCESSFUL(org.jboss.seam.security.loginSuccessful) is being called twice. What gives?


      @Name("org.jboss.seam.security.facesSecurityEvents")
      @Scope(ScopeType.APPLICATION)
      @Install(precedence = APPLICATION, classDependencies = "javax.faces.context.FacesContext")
      @BypassInterceptors
      @Startup
      public class SecurityEventsHandler extends org.jboss.seam.security.FacesSecurityEvents {
      
       @Logger Log log;
      
       @Override @Observer(Identity.EVENT_LOGIN_SUCCESSFUL)
       public void addLoginSuccessfulMessage()
       {
       log.info("\n\n\n>>>>>>>>>>>>>>>>>>>>EVENT_LOGIN_SUCCESSFUL handled<<<<<<<<<<<<<<<<<<<<<<<<\n\n\n");
       }
      
      
      }
      


      My identity.login ff:

      @Override
       public String login() {
       super.login();
       return loginFailed ? null : this.destination;
       }