User: starksm Date: 02/03/14 11:07:56 Modified: src/main/org/jboss/security/plugins JaasSecurityManager.java Log: Use the SecurityAssociation subject rather than a local copy Revision Changes Path 1.22 +5 -8 jbosssx/src/main/org/jboss/security/plugins/JaasSecurityManager.java Index: JaasSecurityManager.java =================================================================== RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/plugins/JaasSecurityManager.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- JaasSecurityManager.java 10 Feb 2002 17:11:20 -0000 1.21 +++ JaasSecurityManager.java 14 Mar 2002 19:07:56 -0000 1.22 @@ -53,7 +53,7 @@ @author <a href="[EMAIL PROTECTED]">Oleg Nitz</a> @author [EMAIL PROTECTED] - @version $Revision: 1.21 $ + @version $Revision: 1.22 $ */ public class JaasSecurityManager implements SubjectSecurityManager, RealmMapping { @@ -67,9 +67,6 @@ Group roles; } - /** The current authenticate()d subject. - */ - private static ThreadLocal activeSubject = new ThreadLocal(); /** The name of the domain this instance is securing. It is used as the appName into the SecurityPolicy. */ @@ -190,7 +187,7 @@ */ public Subject getActiveSubject() { - return (Subject) activeSubject.get(); + return SecurityAssociation.getSubject(); } /** Validate that the given credential is correct for principal. This first @@ -355,7 +352,7 @@ try { // Clear any current subject - activeSubject.set(null); + SecurityAssociation.setSubject(null); // Get the AppPolicy login info. Not implemented yet. AppPolicy policy = null; subject = defaultLogin(principal, credential); @@ -363,7 +360,7 @@ // Set the current subject if login was successful if( subject != null ) { - activeSubject.set(subject); + SecurityAssociation.setSubject(subject); authenticated = true; // Build the Subject based DomainInfo cache value updateCache(subject, principal, credential); @@ -444,7 +441,7 @@ // If the credentials match set the thread's active Subject if( isValid ) { - activeSubject.set(info.subject); + SecurityAssociation.setSubject(info.subject); } return isValid;
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development