Package org.gatein.wci.authentication

Examples of org.gatein.wci.authentication.AuthenticationEvent


   {
      String remoteUser = request.getRemoteUser();
      if (remoteUser  == null)
      {
         registration.context.login(request, response, credentials);
         fireEvent(new AuthenticationEvent(AuthenticationEventType.LOGIN, request, response, credentials.getUsername(), registration.context));
      }
      else
      {
         throw new IllegalStateException("User already authenticated");
      }
View Full Code Here


      if (remoteUser != null)
      {
         try
         {
            registration.context.logout(request, response);
            fireEvent(new AuthenticationEvent(AuthenticationEventType.LOGOUT, request, response, remoteUser, registration.context));
         }
         catch (ServletException ignore)
         {
         }
      }
View Full Code Here

      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

      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

   public void login(HttpServletRequest request, HttpServletResponse response, Credentials credentials, long validityMillis, String initialURI) throws ServletException, IOException
   {
      registration.context.login(request, response, credentials, validityMillis, initialURI);

      //
      fireEvent(EventType.LOGIN, new AuthenticationEvent(request, response, credentials, registration.context));
   }
View Full Code Here

   public void logout(HttpServletRequest request, HttpServletResponse response) throws ServletException
   {
      registration.context.logout(request, response);

      //
      fireEvent(EventType.LOGOUT, new AuthenticationEvent(request, response, registration.context));
   }
View Full Code Here

      AuthenticationResult result = registration.context.login(request, response, userName, password, validityMillis);

      //
      if (!(result instanceof GenericAuthenticationResult))
      {
         fireEvent(EventType.LOGIN, new AuthenticationEvent(request, response, new Credentials(userName, password)));
      }

      return result;
   }
View Full Code Here

   public void logout(HttpServletRequest request, HttpServletResponse response) throws ServletException
   {
      registration.context.logout(request, response);

      //
      fireEvent(EventType.LOGOUT, new AuthenticationEvent(request, response));
   }
View Full Code Here

   public void login(HttpServletRequest request, HttpServletResponse response, Credentials credentials, long validityMillis, String initialURI) throws ServletException, IOException
   {
      registration.context.login(request, response, credentials, validityMillis, initialURI);

      //
      fireEvent(EventType.LOGIN, new AuthenticationEvent(request, response, credentials, registration.context));
   }
View Full Code Here

   public void logout(HttpServletRequest request, HttpServletResponse response) throws ServletException
   {
      registration.context.logout(request, response);

      //
      fireEvent(EventType.LOGOUT, new AuthenticationEvent(request, response, registration.context));
   }
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.