1 Reply Latest reply on Apr 5, 2011 3:41 AM by lvdberg

    Observe JpaIdentityStore.EVENT_USER_AUTHENTICATED event

    hmichopoulos

      Hi! I am new to seam world and I feel that it fills many JSF gaps.
      Thanks for this great framework.


      Now, my problem...
      I have created an application that uses jpaIdentityStore. The authentication works fine. My problem is that the observer for JpaIdentityStore.EVENT_USER_AUTHENTICATED events is not called.


      @Name("authListener")
      public class AuthListener {
           
           @Observer(JpaIdentityStore.AUTHENTICATED_USER)
           public void printHim(AppUser o) {
                System.out.println("Object : " +o.toString());
           }
           
           @Observer("org.jboss.seam.security.loginSuccessful")
           public void test() {
                System.out.println("TESTING LOGIN SCFL");
           }
      }
      



      The latter method get invoked. The former one never gets called. (AppUser is the user entity)


      Thank you in advance.

        • 1. Re: Observe JpaIdentityStore.EVENT_USER_AUTHENTICATED event
          lvdberg

          Hi,


          I only know that


          JpaIdentityStore.AUTHENTICATED_USER 



          is a String constant which is used to retrieve an authenticated user from the session context, I'm guessing here, but I don't think it is used as a constant for firing an event.


          If you need the user you can get it inside the second method by using the builtin identity component.


          Leo