[jboss-cvs] jboss-seam/src/main/org/jboss/seam/security ...

Shane Bryzak Shane_Bryzak at symantec.com
Tue Jan 30 18:45:30 EST 2007


  User: sbryzak2
  Date: 07/01/30 18:45:30

  Modified:    src/main/org/jboss/seam/security  Identity.java
  Log:
  better exception handling during authentication
  
  Revision  Changes    Path
  1.28      +17 -5     jboss-seam/src/main/org/jboss/seam/security/Identity.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Identity.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/Identity.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -b -r1.27 -r1.28
  --- Identity.java	30 Jan 2007 10:47:23 -0000	1.27
  +++ Identity.java	30 Jan 2007 23:45:30 -0000	1.28
  @@ -39,7 +39,10 @@
   import org.jboss.seam.annotations.Name;
   import org.jboss.seam.annotations.Scope;
   import org.jboss.seam.contexts.Contexts;
  +import org.jboss.seam.core.FacesMessages;
   import org.jboss.seam.core.Expressions.MethodBinding;
  +import org.jboss.seam.log.LogProvider;
  +import org.jboss.seam.log.Logging;
   import org.jboss.seam.security.jaas.SeamLoginModule;
   import org.jboss.seam.util.UnifiedELValueBinding;
   
  @@ -53,6 +56,8 @@
      
      private static final String DEFAULT_JAAS_CONFIG_NAME = "default";   
      
  +   private static final LogProvider log = Logging.getLogProvider(Identity.class);
  +   
      private class LoginModuleConfiguration extends Configuration
      {
         private Map<String,AppConfigurationEntry[]> entries = new HashMap<String,AppConfigurationEntry[]>();
  @@ -180,11 +185,18 @@
                     getConfiguration());
         }
         
  +      try
  +      {
         loginContext.login();
  -      
         password = null;
         postLogin();
      }
  +      catch (LoginException ex)
  +      {
  +         log.error("Login failed", ex);
  +         FacesMessages.instance().add("Login failed.");
  +      }
  +   }
      
      public void logout()
      {
  
  
  



More information about the jboss-cvs-commits mailing list