1 Reply Latest reply on Jul 20, 2010 6:25 AM by babazs

    Observer method arguments

    lobotomy

      I am new to seam In one of the seam examples I find the following method that is activated by JpaIdentityStore.EVENTUSERAUTHENTICATED, my question is where does the UserIdentity account argument come from, is it  from the session I could not find any observer methods with the arguments in the documentation.


      package org.jboss.seam.example.booking.Users;
      
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Observer;
      import org.jboss.seam.contexts.Contexts;
      import org.jboss.seam.security.management.JpaIdentityStore;
      
      @Name("authenticationEvents")
      public class UpdateAreasStats
      {
         @Observer(JpaIdentityStore.EVENT_USER_AUTHENTICATED)
         public void loginSuccessful(UserIdentity account)
         {
            Contexts.getSessionContext().set("authenticatedUser", account.getUser());
      
         }
      
      }



        • 1. Re: Observer method arguments
          babazs

          It comes from an Events.instance().raiseEvent(JpaIdentityStore.EVENTUSERAUTHENTICATED, account); invocation. JPAIdentityStore.java/authenticate(String username, String password))