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

Shane Bryzak Shane_Bryzak at symantec.com
Thu Dec 21 23:06:03 EST 2006


  User: sbryzak2
  Date: 06/12/21 23:06:03

  Modified:    src/main/org/jboss/seam/security/authenticator 
                        Authenticator.java
  Log:
  check if Identity is set during un-authentication
  
  Revision  Changes    Path
  1.17      +71 -70    jboss-seam/src/main/org/jboss/seam/security/authenticator/Authenticator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Authenticator.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/authenticator/Authenticator.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -b -r1.16 -r1.17
  --- Authenticator.java	13 Dec 2006 05:08:53 -0000	1.16
  +++ Authenticator.java	22 Dec 2006 04:06:03 -0000	1.17
  @@ -17,12 +17,13 @@
   import org.jboss.seam.util.Reflections;
   
   /**
  - *
  + * Authenticates a user and creates an Identity for them within the session context
    *
    * @author Shane Bryzak
    */
   @Name("org.jboss.seam.security.authenticator")
  - at Install(value=false, precedence=BUILT_IN, dependencies = "org.jboss.seam.securityManager")
  + at Install(value = false, precedence = BUILT_IN, 
  +      dependencies = "org.jboss.seam.securityManager")
   public abstract class Authenticator
   {
     private List<AuthenticationAdapter> adapters = new ArrayList<AuthenticationAdapter>();
  @@ -35,7 +36,7 @@
       Authenticator instance = (Authenticator) Component.getInstance(
           Authenticator.class, ScopeType.APPLICATION);
   
  -    if (instance==null)
  +      if (instance == null)
       {
         throw new IllegalStateException(
             "No Authenticator could be created, make sure the Component exists in application scope");
  @@ -63,6 +64,7 @@
   
     public void unauthenticateSession()
     {
  +      if (Identity.isSet())
       Identity.instance().invalidate();
     }
   
  @@ -72,11 +74,10 @@
       {
         try
         {
  -        adapters.add((AuthenticationAdapter) Reflections.classForName(name).newInstance());
  -      }
  -      catch (Exception ex)
  -      {
  +            adapters.add((AuthenticationAdapter) Reflections.classForName(name)
  +                  .newInstance());
         }
  +         catch (Exception ex) { }
       }
     }
   
  
  
  



More information about the jboss-cvs-commits mailing list