geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject cvs commit: incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc PolicyContextHandlerContainerSubject.java
Date Wed, 14 Jul 2004 03:23:01 GMT
adc         2004/07/13 20:23:01

  Modified:    modules/security/src/java/org/apache/geronimo/security/jacc
                        PolicyContextHandlerContainerSubject.java
  Log:
  Get subject from ContextManager not from Thread.
  
  Revision  Changes    Path
  1.4       +7 -5      incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyContextHandlerContainerSubject.java
  
  Index: PolicyContextHandlerContainerSubject.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyContextHandlerContainerSubject.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PolicyContextHandlerContainerSubject.java	10 Mar 2004 09:59:25 -0000	1.3
  +++ PolicyContextHandlerContainerSubject.java	14 Jul 2004 03:23:01 -0000	1.4
  @@ -17,18 +17,20 @@
   
   package org.apache.geronimo.security.jacc;
   
  -import java.security.AccessController;
  -
  -import javax.security.auth.Subject;
   import javax.security.jacc.PolicyContextException;
   import javax.security.jacc.PolicyContextHandler;
   
  +import org.apache.geronimo.security.ContextManager;
  +
   
   /**
  + * Container Subject Policy Context Handler
    *
    * @version $Revision$ $Date$
  + * @see "JACC v1.0" section 4.6.1.1
    */
   public class PolicyContextHandlerContainerSubject implements PolicyContextHandler {
  +
       public static final String HANDLER_KEY = "javax.security.auth.Subject.container";
   
       public boolean supports(String key) throws PolicyContextException {
  @@ -41,7 +43,7 @@
   
       public Object getContext(String key, Object data) throws PolicyContextException {
           try {
  -            return Subject.getSubject(AccessController.getContext());
  +            return ContextManager.getCurrentCaller();
           } catch (Exception e) {
               throw new PolicyContextException(e);
           }
  
  
  

Mime
View raw message