[jboss-cvs] JBossAS SVN: r76827 - in projects/security/security-negotiation/trunk: jboss-negotiation/src/main/java/org/jboss/security/negotiation/spnego and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Aug 8 08:31:13 EDT 2008


Author: darran.lofthouse at jboss.com
Date: 2008-08-08 08:31:13 -0400 (Fri, 08 Aug 2008)
New Revision: 76827

Added:
   projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/SPNEGOContext.java
Removed:
   projects/security/security-negotiation/trunk/jboss-negotiation/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOContext.java
Modified:
   projects/security/security-negotiation/trunk/jboss-negotiation-spnego/pom.xml
   projects/security/security-negotiation/trunk/jboss-negotiation/pom.xml
Log:
[SECURITY-217] Project refactoring.

Modified: projects/security/security-negotiation/trunk/jboss-negotiation/pom.xml
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation/pom.xml	2008-08-08 12:22:11 UTC (rev 76826)
+++ projects/security/security-negotiation/trunk/jboss-negotiation/pom.xml	2008-08-08 12:31:13 UTC (rev 76827)
@@ -14,6 +14,31 @@
   <build>
     <plugins>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <artifactSet>
+                <includes>
+                  <include>org.jboss.security:jboss-negotiation-common</include>
+                  <include>org.jboss.security:jboss-negotiation-ntlm</include>
+                  <include>org.jboss.security:jboss-negotiation-spnego</include>
+                </includes>
+              </artifactSet>
+              <transformers>
+                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
+              </transformers>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+        
+      <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <printSummary>true</printSummary>
@@ -31,7 +56,19 @@
   <!-- Do not add version information here, use ../parent/pom.xml instead -->
   <dependencies>
     <!-- Local Dependencies -->
- 
+    <dependency>
+      <groupId>org.jboss.security</groupId>
+      <artifactId>jboss-negotiation-common</artifactId>     
+    </dependency>       
+    <dependency>
+      <groupId>org.jboss.security</groupId>
+      <artifactId>jboss-negotiation-ntlm</artifactId>     
+    </dependency>      
+   <dependency>
+      <groupId>org.jboss.security</groupId>
+      <artifactId>jboss-negotiation-spnego</artifactId>     
+   </dependency>
+      
     <!-- Global dependencies -->
     <dependency>
       <groupId>apache-log4j</groupId>

Deleted: projects/security/security-negotiation/trunk/jboss-negotiation/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOContext.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOContext.java	2008-08-08 12:22:11 UTC (rev 76826)
+++ projects/security/security-negotiation/trunk/jboss-negotiation/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOContext.java	2008-08-08 12:31:13 UTC (rev 76827)
@@ -1,114 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * 
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.security.negotiation.spnego;
-
-import org.apache.log4j.Logger;
-import org.ietf.jgss.GSSContext;
-
-/**
- * The SPNEGOContext is the holder to contain the state of the current authentication process
- * and is used to transfer data between the authenticator valve and the login module.
- * 
- * @author darran.lofthouse at jboss.com
- * @version $Revision$
- */
-public class SPNEGOContext
-{
-
-   private static final Logger log = Logger.getLogger(SPNEGOContext.class);
-
-   private static final ThreadLocal<SPNEGOContext> spnegoContext = new ThreadLocal<SPNEGOContext>();
-
-   private boolean authenticated = false;
-
-   private String requestHeader = null;
-
-   private String responseHeader = null;
-
-   // TODO : This class needs to be Externalizable so this can be converted to a 
-   //        byte[] for transport.
-   private GSSContext gssContext = null;
-
-   public static SPNEGOContext getCurrentSPNEGOContext()
-   {
-      return spnegoContext.get();
-   }
-
-   void associate()
-   {
-      log.trace("associate " + this.hashCode());
-      spnegoContext.set(this);
-   }
-
-   /**
-    * Clear any information that is not required to be retained between invocations.
-    */
-   void clear()
-   {
-      log.trace("clear " + this.hashCode());
-      requestHeader = null;
-      responseHeader = null;
-      spnegoContext.remove();
-   }
-
-   public boolean isAuthenticated()
-   {
-      return authenticated;
-   }
-
-   public void setAuthenticated(boolean authenticated)
-   {
-      this.authenticated = authenticated;
-   }
-
-   public String getRequestHeader()
-   {
-      return requestHeader;
-   }
-
-   public void setRequestHeader(String requestHeader)
-   {
-      this.requestHeader = requestHeader;
-   }
-
-   public String getResponseHeader()
-   {
-      return responseHeader;
-   }
-
-   public void setResponseHeader(String responseHeader)
-   {
-      this.responseHeader = responseHeader;
-   }
-
-   public GSSContext getGssContext()
-   {
-      return gssContext;
-   }
-
-   public void setGssContext(GSSContext gssContext)
-   {
-      this.gssContext = gssContext;
-   }
-
-}

Copied: projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/SPNEGOContext.java (from rev 76800, projects/security/security-negotiation/trunk/jboss-negotiation/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOContext.java)
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/SPNEGOContext.java	                        (rev 0)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/SPNEGOContext.java	2008-08-08 12:31:13 UTC (rev 76827)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * 
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.security.negotiation.common;
+
+import org.apache.log4j.Logger;
+import org.ietf.jgss.GSSContext;
+
+/**
+ * The SPNEGOContext is the holder to contain the state of the current authentication process
+ * and is used to transfer data between the authenticator valve and the login module.
+ * 
+ * @author darran.lofthouse at jboss.com
+ * @version $Revision$
+ */
+public class SPNEGOContext
+{
+
+   private static final Logger log = Logger.getLogger(SPNEGOContext.class);
+
+   private static final ThreadLocal<SPNEGOContext> spnegoContext = new ThreadLocal<SPNEGOContext>();
+
+   private boolean authenticated = false;
+
+   private String requestHeader = null;
+
+   private String responseHeader = null;
+
+   // TODO : This class needs to be Externalizable so this can be converted to a 
+   //        byte[] for transport.
+   private GSSContext gssContext = null;
+
+   public static SPNEGOContext getCurrentSPNEGOContext()
+   {
+      return spnegoContext.get();
+   }
+
+   void associate()
+   {
+      log.trace("associate " + this.hashCode());
+      spnegoContext.set(this);
+   }
+
+   /**
+    * Clear any information that is not required to be retained between invocations.
+    */
+   void clear()
+   {
+      log.trace("clear " + this.hashCode());
+      requestHeader = null;
+      responseHeader = null;
+      spnegoContext.remove();
+   }
+
+   public boolean isAuthenticated()
+   {
+      return authenticated;
+   }
+
+   public void setAuthenticated(boolean authenticated)
+   {
+      this.authenticated = authenticated;
+   }
+
+   public String getRequestHeader()
+   {
+      return requestHeader;
+   }
+
+   public void setRequestHeader(String requestHeader)
+   {
+      this.requestHeader = requestHeader;
+   }
+
+   public String getResponseHeader()
+   {
+      return responseHeader;
+   }
+
+   public void setResponseHeader(String responseHeader)
+   {
+      this.responseHeader = responseHeader;
+   }
+
+   public GSSContext getGssContext()
+   {
+      return gssContext;
+   }
+
+   public void setGssContext(GSSContext gssContext)
+   {
+      this.gssContext = gssContext;
+   }
+
+}

Modified: projects/security/security-negotiation/trunk/jboss-negotiation-spnego/pom.xml
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-spnego/pom.xml	2008-08-08 12:22:11 UTC (rev 76826)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-spnego/pom.xml	2008-08-08 12:31:13 UTC (rev 76827)
@@ -30,13 +30,9 @@
 
   <!-- Do not add version information here, use ../parent/pom.xml instead -->
   <dependencies>
-    <!-- Local Dependencies -->
+    <!-- Local Dependencies -->    
     <dependency>
       <groupId>org.jboss.security</groupId>
-      <artifactId>jboss-negotiation</artifactId>
-    </dependency>    
-    <dependency>
-      <groupId>org.jboss.security</groupId>
       <artifactId>jboss-negotiation-common</artifactId>
     </dependency>
           




More information about the jboss-cvs-commits mailing list