4 Replies Latest reply on Aug 13, 2010 4:52 AM by josdaniel

    How to fetch the username which triggered a login failed event

    josdaniel
      We would like to fetch the username which triggered a login failed event. In order to do that we registered an observer for the following event org.jboss.seam.security.loginFailed, but not sure how to get a handle to the username. I tried storing this information in the session context on the authenticate method, but the retrieved value from the session context on the listener code was null

          @Observer("org.jboss.seam.security.loginFailed")
          public void loginFailed() {
              String username = (String) Contexts.getSessionContext().get("username");
              // the above value is null
          }