[jboss-cvs] JBossAS SVN: r76828 - in projects/security/security-negotiation/trunk: jboss-negotiation/src/main/java/org/jboss/security/negotiation/spnego and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Aug 8 08:38:17 EDT 2008
Author: darran.lofthouse at jboss.com
Date: 2008-08-08 08:38:17 -0400 (Fri, 08 Aug 2008)
New Revision: 76828
Added:
projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/NegotiationContext.java
Removed:
projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/SPNEGOContext.java
Modified:
projects/security/security-negotiation/trunk/jboss-negotiation-spnego/.classpath
projects/security/security-negotiation/trunk/jboss-negotiation-spnego/.project
projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOLoginModule.java
projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.classpath
projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.project
projects/security/security-negotiation/trunk/jboss-negotiation/.classpath
projects/security/security-negotiation/trunk/jboss-negotiation/.project
projects/security/security-negotiation/trunk/jboss-negotiation/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOAuthenticator.java
projects/security/security-negotiation/trunk/parent/pom.xml
Log:
[SECURITY-217] Project refactoring.
Modified: projects/security/security-negotiation/trunk/jboss-negotiation/.classpath
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation/.classpath 2008-08-08 12:31:13 UTC (rev 76827)
+++ projects/security/security-negotiation/trunk/jboss-negotiation/.classpath 2008-08-08 12:38:17 UTC (rev 76828)
@@ -11,4 +11,9 @@
<classpathentry kind="var" path="M2_REPO/jboss/jbosssx/4.2.2.GA/jbosssx-4.2.2.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/jboss/web/jbossweb/2.1.0.GA/jbossweb-2.1.0.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.0.GA/servlet-api-2.1.0.GA.jar"/>
+ <classpathentry kind="src" path="/jboss-negotiation-common"/>
+ <classpathentry kind="var" path="M2_REPO/apache-codec/commons-codec/1.2/commons-codec-1.2.jar"/>
+ <classpathentry kind="src" path="/jboss-negotiation-ntlm"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+ <classpathentry kind="src" path="/jboss-negotiation-spnego"/>
</classpath>
\ No newline at end of file
Modified: projects/security/security-negotiation/trunk/jboss-negotiation/.project
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation/.project 2008-08-08 12:31:13 UTC (rev 76827)
+++ projects/security/security-negotiation/trunk/jboss-negotiation/.project 2008-08-08 12:38:17 UTC (rev 76828)
@@ -1,7 +1,11 @@
<projectDescription>
<name>jboss-negotiation</name>
<comment>JBoss Negotiation Library</comment>
- <projects/>
+ <projects>
+ <project>jboss-negotiation-common</project>
+ <project>jboss-negotiation-ntlm</project>
+ <project>jboss-negotiation-spnego</project>
+ </projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
Modified: projects/security/security-negotiation/trunk/jboss-negotiation/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOAuthenticator.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOAuthenticator.java 2008-08-08 12:31:13 UTC (rev 76827)
+++ projects/security/security-negotiation/trunk/jboss-negotiation/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOAuthenticator.java 2008-08-08 12:38:17 UTC (rev 76828)
@@ -32,6 +32,7 @@
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.LoginConfig;
import org.apache.log4j.Logger;
+import org.jboss.security.negotiation.common.NegotiationContext;
/**
* An authenticator to manage SPNEGO authentication in connection with the
@@ -79,12 +80,12 @@
}
Session session = request.getSessionInternal();
- SPNEGOContext spnegoContext = (SPNEGOContext) session.getNote(SPNEGO_CONTEXT);
+ NegotiationContext spnegoContext = (NegotiationContext) session.getNote(SPNEGO_CONTEXT);
if (spnegoContext == null)
{
log.debug("Creating new SPNEGOContext");
{
- spnegoContext = new SPNEGOContext();
+ spnegoContext = new NegotiationContext();
session.setNote(SPNEGO_CONTEXT, spnegoContext);
}
}
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/NegotiationContext.java (from rev 76827, projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/SPNEGOContext.java)
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/NegotiationContext.java (rev 0)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/NegotiationContext.java 2008-08-08 12:38:17 UTC (rev 76828)
@@ -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 NegotiationContext
+{
+
+ private static final Logger log = Logger.getLogger(NegotiationContext.class);
+
+ private static final ThreadLocal<NegotiationContext> spnegoContext = new ThreadLocal<NegotiationContext>();
+
+ 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 NegotiationContext getCurrentSPNEGOContext()
+ {
+ return spnegoContext.get();
+ }
+
+ public void associate()
+ {
+ log.trace("associate " + this.hashCode());
+ spnegoContext.set(this);
+ }
+
+ /**
+ * Clear any information that is not required to be retained between invocations.
+ */
+ public 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;
+ }
+
+}
Deleted: projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/SPNEGOContext.java
===================================================================
--- 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)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-common/src/main/java/org/jboss/security/negotiation/common/SPNEGOContext.java 2008-08-08 12:38:17 UTC (rev 76828)
@@ -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.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/.classpath
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-spnego/.classpath 2008-08-08 12:31:13 UTC (rev 76827)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-spnego/.classpath 2008-08-08 12:38:17 UTC (rev 76828)
@@ -7,12 +7,7 @@
<classpathentry kind="var" path="M2_REPO/jboss/jboss-common/4.2.2.GA/jboss-common-4.2.2.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/jboss/jbosssx/4.2.2.GA/jbosssx-4.2.2.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
- <classpathentry kind="src" path="/jboss-negotiation"/>
- <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-jmx/4.2.2.GA/jboss-jmx-4.2.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-system/4.2.2.GA/jboss-system-4.2.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/web/jbossweb/2.1.0.GA/jbossweb-2.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.0.GA/servlet-api-2.1.0.GA.jar"/>
<classpathentry kind="src" path="/jboss-negotiation-common"/>
<classpathentry kind="var" path="M2_REPO/apache-codec/commons-codec/1.2/commons-codec-1.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
</classpath>
\ No newline at end of file
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-spnego/.project
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-spnego/.project 2008-08-08 12:31:13 UTC (rev 76827)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-spnego/.project 2008-08-08 12:38:17 UTC (rev 76828)
@@ -2,7 +2,6 @@
<name>jboss-negotiation-spnego</name>
<comment>JBoss Negotiation Library</comment>
<projects>
- <project>jboss-negotiation</project>
<project>jboss-negotiation-common</project>
</projects>
<buildSpec>
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOLoginModule.java
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOLoginModule.java 2008-08-08 12:31:13 UTC (rev 76827)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-spnego/src/main/java/org/jboss/security/negotiation/spnego/SPNEGOLoginModule.java 2008-08-08 12:38:17 UTC (rev 76828)
@@ -45,6 +45,7 @@
import org.jboss.security.auth.spi.AbstractServerLoginModule;
import org.jboss.security.negotiation.common.MessageTrace;
+import org.jboss.security.negotiation.common.NegotiationContext;
import org.jboss.security.negotiation.spnego.encoding.NegTokenInit;
import org.jboss.security.negotiation.spnego.encoding.NegTokenInitDecoder;
import org.jboss.security.negotiation.spnego.encoding.NegTokenTarg;
@@ -105,7 +106,7 @@
super.loginOk = false;
- SPNEGOContext spnegoContext = SPNEGOContext.getCurrentSPNEGOContext();
+ NegotiationContext spnegoContext = NegotiationContext.getCurrentSPNEGOContext();
try
{
@@ -195,9 +196,9 @@
private class AcceptSecContext implements PrivilegedAction
{
- private final SPNEGOContext spnegoContext;
+ private final NegotiationContext spnegoContext;
- public AcceptSecContext(final SPNEGOContext spnegoContext)
+ public AcceptSecContext(final NegotiationContext spnegoContext)
{
this.spnegoContext = spnegoContext;
}
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.classpath
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.classpath 2008-08-08 12:31:13 UTC (rev 76827)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.classpath 2008-08-08 12:38:17 UTC (rev 76828)
@@ -7,11 +7,12 @@
<classpathentry kind="var" path="M2_REPO/jboss/jbosssx/4.2.2.GA/jbosssx-4.2.2.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.0.GA/servlet-api-2.1.0.GA.jar"/>
<classpathentry kind="src" path="/jboss-negotiation"/>
+ <classpathentry kind="src" path="/jboss-negotiation-common"/>
+ <classpathentry kind="var" path="M2_REPO/apache-codec/commons-codec/1.2/commons-codec-1.2.jar"/>
+ <classpathentry kind="src" path="/jboss-negotiation-ntlm"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+ <classpathentry kind="src" path="/jboss-negotiation-spnego"/>
<classpathentry kind="var" path="M2_REPO/jboss/jboss-jmx/4.2.2.GA/jboss-jmx-4.2.2.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/jboss/jboss-system/4.2.2.GA/jboss-system-4.2.2.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/jboss/web/jbossweb/2.1.0.GA/jbossweb-2.1.0.GA.jar"/>
- <classpathentry kind="src" path="/jboss-negotiation-common"/>
- <classpathentry kind="var" path="M2_REPO/apache-codec/commons-codec/1.2/commons-codec-1.2.jar"/>
- <classpathentry kind="src" path="/jboss-negotiation-spnego"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
</classpath>
\ No newline at end of file
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.project
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.project 2008-08-08 12:31:13 UTC (rev 76827)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.project 2008-08-08 12:38:17 UTC (rev 76828)
@@ -4,6 +4,7 @@
<projects>
<project>jboss-negotiation</project>
<project>jboss-negotiation-common</project>
+ <project>jboss-negotiation-ntlm</project>
<project>jboss-negotiation-spnego</project>
</projects>
<buildSpec>
Modified: projects/security/security-negotiation/trunk/parent/pom.xml
===================================================================
--- projects/security/security-negotiation/trunk/parent/pom.xml 2008-08-08 12:31:13 UTC (rev 76827)
+++ projects/security/security-negotiation/trunk/parent/pom.xml 2008-08-08 12:38:17 UTC (rev 76828)
@@ -116,7 +116,7 @@
<groupId>org.jboss.security</groupId>
<artifactId>jboss-negotiation-spnego</artifactId>
<version>${project.version}</version>
- </dependency>
+ </dependency>
<!-- External Dependencies -->
<dependency>
More information about the jboss-cvs-commits
mailing list