Package org.gatein.wci.authentication

Examples of org.gatein.wci.authentication.AuthenticationEvent


      if (remoteUser  == null)
      {
         try
         {
            registration.context.login(request, response, credentials);
            fireEvent(new AuthenticationEvent(AuthenticationEventType.LOGIN,
                  request, response, credentials.getUsername(), credentials, registration.context));
         }
         catch (AuthenticationException ae)
         {
            fireEvent(new AuthenticationEvent(AuthenticationEventType.FAILED,
                  request, response, credentials.getUsername(), credentials, registration.context));
            throw ae;
         }
      }
      else
View Full Code Here


   @InSequence(3)
   public void testAuthenticationFailure()
   {
      Assert.assertNull(AuthenticationServlet.remoteUser);
      Assert.assertEquals(1, AuthenticationServlet.authEvents.size());
      AuthenticationEvent event = AuthenticationServlet.authEvents.removeFirst();
      Assert.assertEquals(AuthenticationEventType.FAILED, event.getType());
      AuthenticationServlet.status = 2;
   }
View Full Code Here

   @InSequence(5)
   public void testUserIsAuthenticated()
   {
      Assert.assertEquals("foo", AuthenticationServlet.remoteUser);
      Assert.assertEquals(1, AuthenticationServlet.authEvents.size());
      AuthenticationEvent event = AuthenticationServlet.authEvents.removeFirst();
      Assert.assertEquals(AuthenticationEventType.LOGIN, event.getType());
      Assert.assertEquals("foo", event.getCredentials().getUsername());
      Assert.assertEquals("bar", event.getCredentials().getPassword());
      AuthenticationServlet.status = 3;
   }
View Full Code Here

TOP

Related Classes of org.gatein.wci.authentication.AuthenticationEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.