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

Shane Bryzak Shane_Bryzak at symantec.com
Sun Dec 3 20:06:51 EST 2006


  User: sbryzak2
  Date: 06/12/03 20:06:51

  Modified:    src/main/org/jboss/seam/security/adapter/jboss 
                        JBossAuthenticationAdapter.java
  Log:
  bye bye old security design
  
  Revision  Changes    Path
  1.3       +33 -24    jboss-seam/src/main/org/jboss/seam/security/adapter/jboss/JBossAuthenticationAdapter.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: JBossAuthenticationAdapter.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/adapter/jboss/JBossAuthenticationAdapter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- JBossAuthenticationAdapter.java	25 Oct 2006 15:14:37 -0000	1.2
  +++ JBossAuthenticationAdapter.java	4 Dec 2006 01:06:51 -0000	1.3
  @@ -6,9 +6,14 @@
   
   import org.jboss.seam.security.Authentication;
   import org.jboss.seam.security.adapter.AuthenticationAdapter;
  +import org.jboss.security.SecurityAssociation;
   import org.jboss.security.auth.callback.UsernamePasswordHandler;
  +import java.security.Principal;
  +import javax.security.auth.Subject;
   
   /**
  + *
  + *
    * @author Shane Bryzak
    */
   public class JBossAuthenticationAdapter implements AuthenticationAdapter
  @@ -17,34 +22,38 @@
   
     public void beginRequest()
     {
  -    Authentication auth = Authentication.instance();
  +    SecurityAssociation.clear();
  +//    Authentication auth = Authentication.instance();
   
  -    CallbackHandler handler = new UsernamePasswordHandler(
  -        auth.getPrincipal().toString(),
  -        auth.getCredentials());
  -    try
  -    {
  -      contexts.set(new LoginContext("client-login", handler));
  -      contexts.get().login();
  -    }
  -    catch (LoginException ex)
  -    {
  -      ex.printStackTrace();
  -    }
  +//    CallbackHandler handler = new UsernamePasswordHandler(
  +//        auth.getPrincipal().toString(),
  +//        auth.getCredentials());
  +//    try
  +//    {
  +//      contexts.set(new LoginContext("client-login", handler));
  +//      contexts.get().login();
  +//    }
  +//    catch (LoginException ex)
  +//    {
  +//      ex.printStackTrace();
  +//    }
     }
   
     public void endRequest()
     {
  -    try
  -    {
  -      contexts.get().logout();
  -    }
  -    catch (LoginException ex)
  -    {
  -    }
  -    finally
  -    {
  -      contexts.remove();
  -    }
  +//    try
  +//    {
  +//      LoginContext ctx = contexts.get();
  +//      if (ctx != null)
  +//        ctx.logout();
  +//    }
  +//    catch (LoginException ex)
  +//    {
  +//      ex.printStackTrace();
  +//    }
  +//    finally
  +//    {
  +//      contexts.remove();
  +//    }
     }
   }
  
  
  



More information about the jboss-cvs-commits mailing list