[jboss-cvs] JBossAS SVN: r64046 - in projects/security/security-jboss-sx/trunk: src/main/org/jboss/security/auth/container/modules and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jul 13 15:56:20 EDT 2007


Author: anil.saldhana at jboss.com
Date: 2007-07-13 15:56:20 -0400 (Fri, 13 Jul 2007)
New Revision: 64046

Added:
   projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/
   projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/JASPIConfigUnitTestCase.java
   projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/
   projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestAuthConfigProvider.java
   projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestServerAuthConfig.java
   projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestServerAuthContext.java
Modified:
   projects/security/security-jboss-sx/trunk/.classpath
   projects/security/security-jboss-sx/trunk/pom.xml
   projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/AbstractServerAuthModule.java
   projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/SimpleClientAuthModule.java
   projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/SimpleServerAuthModule.java
   projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/AuthProviderRegistrationDelegate.java
   projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossAuthConfigFactory.java
   projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossClientAuthConfig.java
   projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossClientAuthContext.java
   projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossServerAuthConfig.java
   projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossServerAuthContext.java
Log:
JASPI 1.0 PFD2 changes

Modified: projects/security/security-jboss-sx/trunk/.classpath
===================================================================
--- projects/security/security-jboss-sx/trunk/.classpath	2007-07-13 18:25:14 UTC (rev 64045)
+++ projects/security/security-jboss-sx/trunk/.classpath	2007-07-13 19:56:20 UTC (rev 64046)
@@ -4,11 +4,12 @@
 	<classpathentry kind="src" output="output/test-classes" path="src/tests"/>
 	<classpathentry kind="src" path="target/generated-sources/javacc"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.8/log4j-1.2.8.jar"/>
+	<classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
 	<classpathentry kind="var" path="M2_REPO/sun-xacml/sun-xacml/2.0/sun-xacml-2.0.jar"/>
 	<classpathentry kind="var" path="M2_REPO/jboss/jbossxb/1.0.0.CR8/jbossxb-1.0.0.CR8.jar"/>
 	<classpathentry kind="var" path="M2_REPO/jboss/jboss-security-spi/2.0.1.snapshot/jboss-security-spi-2.0.1.snapshot.jar"/>
-	<classpathentry kind="var" path="M2_REPO/jboss/jboss-j2ee/SNAPSHOT/jboss-j2ee-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/jboss/jboss-javaee/5.0.0-SNAPSHOT/jboss-javaee-5.0.0-SNAPSHOT.jar"/>
+	<classpathentry kind="var" path="M2_REPO/jboss/jboss-jaspi-api/1.0-SNAPSHOT/jboss-jaspi-api-1.0-SNAPSHOT.jar"/>
 	<classpathentry kind="var" path="M2_REPO/sun-xacml/sunxacml-support/2.0/sunxacml-support-2.0.jar"/>
 	<classpathentry kind="var" path="M2_REPO/jboss/jboss-j2se/5.0-SNAPSHOT/jboss-j2se-5.0-SNAPSHOT.jar"/>
 	<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>

Modified: projects/security/security-jboss-sx/trunk/pom.xml
===================================================================
--- projects/security/security-jboss-sx/trunk/pom.xml	2007-07-13 18:25:14 UTC (rev 64045)
+++ projects/security/security-jboss-sx/trunk/pom.xml	2007-07-13 19:56:20 UTC (rev 64046)
@@ -1,196 +1,168 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" 
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-parent</artifactId>
+      <version>3</version>
+   </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>jboss</groupId>
    <artifactId>jbosssx</artifactId>
    <packaging>jar</packaging>
-   <version>2.0.1.snapshot</version>
+   <version>2.0.1-SNAPSHOT</version>
    <name>JBoss Security Implementation for the JBAS</name>
    <url>http://labs.jboss.org/portal/jbosssecurity/</url>
    <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
-    <licenses>
-       <license>
-          <name>lgpl</name>
-          <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-       </license>
-    </licenses>
-    <organization>
-       <name>JBoss Inc.</name>
-       <url>http://www.jboss.org</url>
-    </organization>
-    <repositories>
-       <repository>
-          <id>jboss</id>
-          <name>JBoss Inc. Repository</name>
-          <layout>default</layout>
-          <url>http://repository.jboss.com/maven2/</url>
-          <snapshots>
-             <enabled>true</enabled>
-          </snapshots>
-       </repository>
-     </repositories>
-     <pluginRepositories>
-        <pluginRepository>
-           <id>jbosspluginrepo</id>
-           <name>jboss plugin repository</name>
-           <url>http://repository.jboss.com/maven2</url>
-           <layout>default</layout>
-           <snapshots>
-              <enabled>false</enabled>
-              <updatePolicy>never</updatePolicy>
-           </snapshots>
-         </pluginRepository>
-         <pluginRepository>
-            <id>Maven Snapshots</id>
-            <url>http://snapshots.maven.codehaus.org/maven2/</url>
-            <snapshots>
-                <enabled>true</enabled>
-            </snapshots>
-            <releases>
-                <enabled>false</enabled>
-            </releases>
-          </pluginRepository>
-          <pluginRepository>
-             <id>LSU ibiblio</id>
-             <url>http://ibiblio.lsu.edu/main/pub/packages/maven2/</url>
-             <snapshots>
-                <enabled>true</enabled>
-             </snapshots>
-             <releases>
-                <enabled>false</enabled>
-             </releases>
-          </pluginRepository>
-       </pluginRepositories>
-       <build>
-           <sourceDirectory>src/main</sourceDirectory>
-           <testSourceDirectory>src/tests</testSourceDirectory>
-           <testOutputDirectory>target/test-classes</testOutputDirectory>
-           <finalName>${artifactId}</finalName>
-           <outputDirectory>output/classes</outputDirectory> 
-           <testResources>
-             <testResource>
-               <directory>src/tests/resources/</directory>
-             </testResource>
-             <testResource>
-               <directory>src/main</directory>
-             </testResource>
-           </testResources>
-           <plugins>
-           <!-- define how we want compilation to take place here, we accept most of the defaults but say that we want the optimization flag set, and define the source and target to be 1.4, these setting will be inherited by child projects -->
-              <plugin>
-                 <artifactId>maven-compiler-plugin</artifactId>
-                 <version>2.0</version>
-                 <configuration>
-                     <optimize>true</optimize>
-                     <source>1.5</source>
-                     <target>1.5</target>
-                 </configuration>
-               </plugin>
-
-               <!-- define that we wish to create src jars -->
-               <plugin>
-                   <artifactId>maven-source-plugin</artifactId>
-                   <version>2.0</version>
-                   <inherited>true</inherited>
-                   <executions>
-                       <execution>
-                           <goals>
-                               <goal>jar</goal>
-                            </goals>
-                       </execution>
-                   </executions>
-                </plugin>
-
-                <!-- generate java files from grammar -->
-                <plugin>
-                   <groupId>org.codehaus.mojo</groupId>
-                   <artifactId>javacc-maven-plugin</artifactId>
-                   <version>0.6.1.1</version>
-                   <configuration>
-                       <packageName>org/jboss/security/auth/login</packageName>
-                       <sourceDirectory>src/main</sourceDirectory>
-                       <isStatic>false</isStatic>
-                   </configuration>
-                   <executions>
-                      <execution>
-                         <goals>
-                            <goal>javacc</goal>
-                         </goals>
-                         <id>javacc</id>
-                      </execution>
-                   </executions>
-                </plugin>
-
-               <plugin>
-                  <groupId>org.apache.maven.plugins</groupId>
-                  <artifactId>maven-jar-plugin</artifactId>
-                  <executions>
-                      <execution>
-                        <goals>
-                          <goal>jar</goal>
-                        </goals>
-                      </execution>
-                 </executions>
-                 <configuration>
-                   <jarName>jbossx</jarName>
-                 </configuration>
-              </plugin>
-
-              <plugin>
-                 <groupId>org.apache.maven.plugins</groupId>
-                 <artifactId>maven-jar-plugin</artifactId>
-                 <version>2.1</version>
-                 <configuration>
-                    <archive>
-                       <addMavenDescriptor>false</addMavenDescriptor>
-                    </archive>
-                 </configuration>
-              </plugin>  
-
-             <plugin>
-                 <artifactId>maven-surefire-plugin</artifactId>
-                 <configuration>
-                   <printSummary>true</printSummary>
-                   <disableXmlReport>false</disableXmlReport>
-                   <testFailureIgnore>true</testFailureIgnore>
-                   <includes>
-                     <include>**/**TestCase.java</include>
-                   </includes>
-                   <excludes>
-                     <exclude>**/ldap/**</exclude>
-                   </excludes>
-                   <forkMode>pertest</forkMode>
-                 </configuration>
-             </plugin>
-
-           
-              <plugin>
-                  <artifactId>maven-antrun-plugin</artifactId>
-                  <version>1.1</version>
-                  <inherited>true</inherited>
-                  <executions>
-                     <execution>
-                        <id>buildjar</id>
-                        <phase>package</phase>
-                        <configuration>
-                          <tasks>
-                            <mkdir dir="${basedir}/output/lib"/>
-                            <copy todir="${basedir}/output/classes">
-                              <fileset dir="${basedir}/src/main">
-                                <include name="org/jboss/security/jacc/*.xml"/>
-                             </fileset>
-                            </copy>
-
+   <licenses>
+      <license>
+         <name>lgpl</name>
+         <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+      </license>
+   </licenses>
+   <organization>
+      <name>JBoss Inc.</name>
+      <url>http://www.jboss.org</url>
+   </organization>
+   <repositories>
+      <repository>
+         <id>jboss</id>
+         <name>JBoss Inc. Repository</name>
+         <layout>default</layout>
+         <url>http://repository.jboss.com/maven2/</url>
+         <snapshots>
+            <enabled>false</enabled>
+         </snapshots>
+      </repository>
+      <repository>
+         <id>snapshots.jboss.org</id>
+         <name>JBoss Inc. Repository</name>
+         <layout>default</layout>
+         <url>http://snapshots.jboss.org/maven2/</url>
+         <snapshots>
+            <enabled>true</enabled>
+         </snapshots>
+         <releases>
+            <enabled>false</enabled>
+         </releases>
+      </repository>
+   </repositories>
+   <pluginRepositories>
+      <pluginRepository>
+         <id>jbosspluginrepo</id>
+         <name>jboss plugin repository</name>
+         <url>http://repository.jboss.com/maven2</url>
+         <layout>default</layout>
+         <snapshots>
+            <enabled>false</enabled>
+            <updatePolicy>never</updatePolicy>
+         </snapshots>
+      </pluginRepository>
+      <pluginRepository>
+         <id>Maven Snapshots</id>
+         <url>http://snapshots.maven.codehaus.org/maven2/</url>
+         <snapshots>
+            <enabled>true</enabled>
+         </snapshots>
+         <releases>
+            <enabled>false</enabled>
+         </releases>
+      </pluginRepository>
+      <pluginRepository>
+         <id>LSU ibiblio</id>
+         <url>http://ibiblio.lsu.edu/main/pub/packages/maven2/</url>
+         <snapshots>
+            <enabled>true</enabled>
+         </snapshots>
+         <releases>
+            <enabled>false</enabled>
+         </releases>
+      </pluginRepository>
+   </pluginRepositories>
+   <build>
+      <sourceDirectory>src/main</sourceDirectory>
+      <testSourceDirectory>src/tests</testSourceDirectory>
+      <testOutputDirectory>target/test-classes</testOutputDirectory>
+      <finalName>${artifactId}</finalName>
+      <outputDirectory>output/classes</outputDirectory>
+      <testResources>
+         <testResource>
+            <directory>src/tests/resources/</directory>
+         </testResource>
+         <testResource>
+            <directory>src/main</directory>
+         </testResource>
+      </testResources>
+      <plugins>
+         <!-- generate java files from grammar -->
+         <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>javacc-maven-plugin</artifactId>
+            <version>0.6.1.1</version>
+            <configuration>
+               <packageName>org/jboss/security/auth/login</packageName>
+               <sourceDirectory>src/main</sourceDirectory>
+               <isStatic>false</isStatic>
+            </configuration>
+            <executions>
+               <execution>
+                  <goals>
+                     <goal>javacc</goal>
+                  </goals>
+                  <id>javacc</id>
+               </execution>
+            </executions>
+         </plugin>
+         <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+               <printSummary>true</printSummary>
+               <disableXmlReport>false</disableXmlReport>
+               <testFailureIgnore>true</testFailureIgnore>
+               <includes>
+                  <include>**/**TestCase.java</include>
+               </includes>
+               <excludes>
+                  <exclude>**/ldap/**</exclude>
+               </excludes>
+               <forkMode>pertest</forkMode>
+            </configuration>
+         </plugin>
+         <!-- define that we wish to create src jars -->
+         <plugin>
+            <artifactId>maven-source-plugin</artifactId>
+            <version>2.0</version>
+            <inherited>true</inherited>
+            <executions>
+               <execution>
+                  <goals>
+                     <goal>jar</goal>
+                  </goals>
+               </execution>
+            </executions>
+         </plugin>
+         <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.1</version>
+            <inherited>true</inherited>
+            <executions>
+               <execution>
+                  <id>buildjar</id>
+                  <phase>package</phase>
+                  <configuration>
+                     <tasks>
+                        <mkdir dir="${basedir}/output/lib"/>
+                        <copy todir="${basedir}/output/classes">
+                           <fileset dir="${basedir}/src/main">
+                              <include name="org/jboss/security/jacc/*.xml"/>
+                           </fileset>
+                        </copy>
                         <!-- Build jbosssx.jar -->
                         <jar jarfile="${basedir}/output/lib/jbosssx.jar" manifest="${basedir}/src/etc/default.mf">
                            <fileset dir="${basedir}/output/classes"/>
                            <fileset dir="${basedir}/src/resources">
                               <include name="dtd/security-policy.dtd"/>
                            </fileset>
-                           <fileset file="${basedir}/JBossORG-EULA.txt"/> 
+                           <fileset file="${basedir}/JBossORG-EULA.txt"/>
                         </jar>
-
                         <!-- Build jbosssx-client.jar -->
                         <jar jarfile="${basedir}/output/lib/jbosssx-client.jar" manifest="${basedir}/src/etc/default.mf">
                            <fileset dir="${basedir}/output/classes">
@@ -211,25 +183,21 @@
                               <include name="org/jboss/security/ssl/RMISSLClientSocketFactory.class"/>
                               <include name="org/jboss/security/plugins/*SecurityContext*.class"/>
                            </fileset>
-                           <fileset file="${basedir}/JBossORG-EULA.txt"/> 
+                           <fileset file="${basedir}/JBossORG-EULA.txt"/>
                         </jar>
-
                         <!-- Build jbosssx-tests.jar -->
                         <mkdir dir="${basedir}/output/test/lib"/>
                         <jar jarfile="${basedir}/output/test/lib/jbosssx-tests.jar" manifest="${basedir}/src/etc/default.mf">
                            <fileset dir="${basedir}/output/classes">
                               <include name="org/jboss/test/TestLoginModule.class"/>
                            </fileset>
-                           <fileset file="${basedir}/JBossORG-EULA.txt"/> 
+                           <fileset file="${basedir}/JBossORG-EULA.txt"/>
                         </jar>
-                        
                         <!-- Build the source jar -->
-                        <jar jarfile="${basedir}/output/lib/jbosssx-sources.jar" 
-                        manifest="${basedir}/src/etc/default.mf">
-                           <fileset dir="${basedir}/src/main"/> 
+                        <jar jarfile="${basedir}/output/lib/jbosssx-sources.jar" manifest="${basedir}/src/etc/default.mf">
+                           <fileset dir="${basedir}/src/main"/>
                            <fileset file="${basedir}/JBossORG-EULA.txt"/>
                         </jar>
-                        
                      </tasks>
                   </configuration>
                   <goals>
@@ -241,28 +209,33 @@
       </plugins>
    </build>
    <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-report-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-        <configuration>
-          <aggregate>true</aggregate>
-        </configuration>
-      </plugin>
-    </plugins>
-  </reporting>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-report-plugin</artifactId>
+         </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-javadoc-plugin</artifactId>
+            <configuration>
+               <aggregate>true</aggregate>
+            </configuration>
+         </plugin>
+      </plugins>
+   </reporting>
    <dependencies>
       <dependency>
          <groupId>jboss</groupId>
-         <artifactId>jboss-j2ee</artifactId>
-         <version>SNAPSHOT</version>
+         <artifactId>jboss-javaee</artifactId>
+         <version>5.0.0-SNAPSHOT</version>
       </dependency>
       <dependency>
          <groupId>jboss</groupId>
+         <artifactId>jboss-jaspi-api</artifactId>
+         <version>1.0-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+         <groupId>jboss</groupId>
          <artifactId>jboss-common-core</artifactId>
          <version>2.0.2.GA</version>
       </dependency>
@@ -279,18 +252,8 @@
       </dependency>
       <dependency>
          <groupId>jboss</groupId>
-         <artifactId>jboss-j2se</artifactId>
-         <version>5.0-SNAPSHOT</version>
-      </dependency> 
-      <dependency>
-         <groupId>jboss</groupId>
-         <artifactId>jnpserver</artifactId>
-         <version>5.0-SNAPSHOT</version>
-      </dependency>
-      <dependency>
-         <groupId>jboss</groupId>
          <artifactId>jboss-security-spi</artifactId>
-         <version>2.0.1.snapshot</version>
+         <version>2.0.1-SNAPSHOT</version>
       </dependency>
       <dependency>
          <groupId>jboss</groupId>
@@ -303,10 +266,15 @@
          <version>3.4.GA</version>
       </dependency>
       <dependency>
+         <groupId>apache-log4j</groupId>
+         <artifactId>log4j</artifactId>
+         <version>1.2.14</version>
+      </dependency>
+      <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
-      </dependency>  
+      </dependency>
       <dependency>
          <groupId>sun-xacml</groupId>
          <artifactId>sun-xacml</artifactId>
@@ -321,11 +289,11 @@
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
          <version>2.5</version>
-      </dependency> 
+      </dependency>
       <dependency>
          <groupId>javax.mail</groupId>
          <artifactId>mail</artifactId>
          <version>1.4</version>
-      </dependency> 
+      </dependency>
    </dependencies>
 </project>

Modified: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/AbstractServerAuthModule.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/AbstractServerAuthModule.java	2007-07-13 18:25:14 UTC (rev 64045)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/AbstractServerAuthModule.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -25,9 +25,9 @@
 
 import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler; 
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.AuthParam;
+import javax.security.auth.message.AuthException; 
 import javax.security.auth.message.AuthStatus;
+import javax.security.auth.message.MessageInfo;
 import javax.security.auth.message.MessagePolicy;
 import javax.security.auth.message.module.ServerAuthModule;
 
@@ -75,12 +75,12 @@
    /**
     * @see ServerAuthModule#secureResponse(AuthParam, Subject, Map)
     */
-   public abstract AuthStatus secureResponse(AuthParam param, Subject source, Map sharedState) throws AuthException; 
+   public abstract AuthStatus secureResponse(MessageInfo param, Subject source, Map sharedState) throws AuthException; 
    
    /**
     * @see ServerAuthModule#validateRequest(AuthParam, Subject, Subject, Map)
     */
-   public abstract AuthStatus validateRequest(AuthParam param, Subject source, Subject recipient, Map sharedState) throws AuthException;
+   public abstract AuthStatus validateRequest(MessageInfo param, Subject source, Subject recipient, Map sharedState) throws AuthException;
   
    //Value Added Methods 
    public CallbackHandler getCallbackHandler()

Modified: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/SimpleClientAuthModule.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/SimpleClientAuthModule.java	2007-07-13 18:25:14 UTC (rev 64045)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/SimpleClientAuthModule.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -26,9 +26,9 @@
 
 import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler; 
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.AuthParam;
+import javax.security.auth.message.AuthException; 
 import javax.security.auth.message.AuthStatus;
+import javax.security.auth.message.MessageInfo;
 import javax.security.auth.message.MessagePolicy;
 import javax.security.auth.message.module.ClientAuthModule;
 
@@ -72,7 +72,7 @@
    /**
     * @see ClientAuthModule#secureRequest(AuthParam, Subject, Map)
     */
-   public AuthStatus secureRequest(AuthParam param, Subject source, Map sharedState) 
+   public AuthStatus secureRequest(MessageInfo param, Subject source) 
    throws AuthException
    { 
       source.getPrincipals().add(this.principal);
@@ -83,8 +83,7 @@
    /**
     * @see ClientAuthModule#validateResponse(AuthParam, Subject, Subject, Map)
     */
-   public AuthStatus validateResponse(AuthParam param, Subject source, Subject recipient, 
-         Map sharedState) throws AuthException
+   public AuthStatus validateResponse(MessageInfo messageInfo, Subject source, Subject recipient) throws AuthException
    {  
       //Custom check: Check that the source of the response and the recipient
       // of the response have identical credentials
@@ -108,10 +107,9 @@
    /**
     * @see ClientAuth#cleanSubject(Subject, Map)
     */
-   public AuthStatus cleanSubject(Subject subject, Map sharedState) throws AuthException
+   public void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException
    { 
       subject.getPrincipals().remove(principal);
-      subject.getPublicCredentials().remove(credential);
-      return AuthStatus.PROCEED;
+      subject.getPublicCredentials().remove(credential); 
    } 
 }

Modified: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/SimpleServerAuthModule.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/SimpleServerAuthModule.java	2007-07-13 18:25:14 UTC (rev 64045)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/container/modules/SimpleServerAuthModule.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -29,9 +29,9 @@
 
 import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.AuthParam;
+import javax.security.auth.message.AuthException; 
 import javax.security.auth.message.AuthStatus;
+import javax.security.auth.message.MessageInfo;
 import javax.security.auth.message.MessagePolicy;
 import javax.security.auth.message.module.ServerAuthModule;
 
@@ -62,7 +62,7 @@
    /**
     * @see ServerAuthModule#cleanSubject(Subject, Map)
     */
-   public void cleanSubject(Subject subject, Map sharedState) throws AuthException
+   public void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException
    {
       subject.getPrincipals().remove(principals);
       subject.getPublicCredentials().remove(credential);
@@ -86,8 +86,7 @@
    /**
     * @see ServerAuthModule#secureResponse(AuthParam, Subject, Map)
     */
-   public AuthStatus secureResponse(AuthParam param, Subject source, 
-         Map sharedState) throws AuthException
+   public AuthStatus secureResponse(MessageInfo param, Subject source) throws AuthException
    { 
       //Check if the source contains a Principal set
       if(source.getPrincipals() == null)
@@ -102,8 +101,7 @@
    /**
     * @see ServerAuthModule#validateRequest(AuthParam, Subject, Subject, Map)
     */
-   public AuthStatus validateRequest(AuthParam param, Subject source, Subject recipient, 
-         Map sharedState) throws AuthException
+   public AuthStatus validateRequest(MessageInfo param, Subject source, Subject recipient) throws AuthException
    { 
       //Custom check: Check that the source of the response and the recipient
       // of the response have identical credentials

Modified: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/AuthProviderRegistrationDelegate.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/AuthProviderRegistrationDelegate.java	2007-07-13 18:25:14 UTC (rev 64045)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/AuthProviderRegistrationDelegate.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -27,16 +27,15 @@
 import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
+import java.util.UUID;
 
 import javax.security.auth.message.AuthException;
 import javax.security.auth.message.config.AuthConfigFactory;
 import javax.security.auth.message.config.AuthConfigProvider;
+import javax.security.auth.message.config.RegistrationListener;
 import javax.security.auth.message.config.AuthConfigFactory.RegistrationContext;
-import javax.security.auth.message.config.AuthConfigFactory.RegistrationListener;
+import org.jboss.logging.Logger; 
 
-import org.jboss.logging.Logger;
-import org.jboss.util.id.GUID;
-
 //$Id$
 
 /**
@@ -177,7 +176,12 @@
          public String getMessageLayer()
          { 
             return layer.equals("NULL")? null : layer;
-         } 
+         }
+
+		public boolean isPersistent() 
+		{ 
+			return false;
+		} 
       };
    }
    
@@ -211,13 +215,7 @@
    { 
       if(className == null || className.length() == 0)
          throw new IllegalArgumentException("className is null or zero length");
-
-      StringBuffer key = new StringBuffer(); 
-      
-      key.append(layer == null ? "NULL" : layer.toUpperCase());
-      key.append("_");
-      key.append(appContext == null ? "NULL" : appContext.toUpperCase());
-      
+ 
       //Instantiate the provider
       AuthConfigProvider acp = null;
       try
@@ -232,20 +230,34 @@
         throw new AuthException("Cannot register Provider "+ className + ":reason="+e); 
       } 
       
+      return this.registerConfigProvider(acp, layer, appContext, description); 
+   }
+   
+   public String registerConfigProvider(AuthConfigProvider provider,
+         String layer,  String appContext,  String description)
+   {
+      if(provider == null)
+         throw new IllegalArgumentException("provider is null");
+      
+      StringBuilder key = new StringBuilder();  
+      key.append(layer == null ? "NULL" : layer.toUpperCase());
+      key.append("_");
+      key.append(appContext == null ? "NULL" : appContext.toUpperCase());
+      
       String keystr = key.toString();
-      keyProviderMap.put(keystr,acp); 
+      keyProviderMap.put(keystr,provider); 
       
       //Generate a GUID
-      GUID guid = new GUID();
+      UUID guid = UUID.randomUUID();
       String providerID = guid.toString();
       this.idKeyMap.put(providerID, keystr);
-      List list = (List)this.providerToIDListMap.get(acp);
+      List list = (List)this.providerToIDListMap.get(provider);
       if(list == null) 
       {
          list = new ArrayList(); 
       }
       list.add(providerID);
-      this.providerToIDListMap.put(acp,list); 
+      this.providerToIDListMap.put(provider,list); 
       if(description != null)
          this.idToDescriptionMap.put(providerID, description);
       
@@ -254,7 +266,7 @@
       if(listener != null)
          listener.notify(layer,appContext);
       
-      return providerID;
+      return providerID;  
    }
    
    /**

Modified: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossAuthConfigFactory.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossAuthConfigFactory.java	2007-07-13 18:25:14 UTC (rev 64045)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossAuthConfigFactory.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -26,6 +26,7 @@
 import javax.security.auth.message.AuthException;
 import javax.security.auth.message.config.AuthConfigFactory;
 import javax.security.auth.message.config.AuthConfigProvider; 
+import javax.security.auth.message.config.RegistrationListener;
 
 //$Id$
 
@@ -102,5 +103,12 @@
    public boolean removeRegistration(String registrationID)
    { 
       return delegate.removeRegistration(registrationID);
+   }
+
+   @Override
+   public String registerConfigProvider(AuthConfigProvider provider,
+         String layer,  String appContext,  String description)
+   { 
+      return delegate.registerConfigProvider(provider, layer, appContext, description);
    } 
 }

Modified: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossClientAuthConfig.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossClientAuthConfig.java	2007-07-13 18:25:14 UTC (rev 64045)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossClientAuthConfig.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -25,9 +25,10 @@
 import java.util.List;
 import java.util.Map;
 
+import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.AuthParam;
+import javax.security.auth.message.AuthException; 
+import javax.security.auth.message.MessageInfo;
 import javax.security.auth.message.config.ClientAuthConfig;
 import javax.security.auth.message.config.ClientAuthContext;
 
@@ -67,21 +68,14 @@
    /**
     * @see ClientAuthConfig#getAuthContext(String, Map)
     */
-   public ClientAuthContext getAuthContext(String operation, Map properties) 
+   public ClientAuthContext getAuthContext(String authContextID,
+         Subject clientSubject, Map properties)
    throws AuthException
    { 
       return new JBossClientAuthContext(this);
-   }
+   }  
 
    /**
-    * @see AuthConfig#getContextID()
-    */
-   public String getContextID()
-   { 
-      return this.contextId;
-   }
-
-   /**
     * @see AuthConfig#getMessageLayer()
     */
    public String getMessageLayer()
@@ -92,7 +86,7 @@
    /**
     * @see AuthConfig#getOperation(AuthParam)
     */
-   public String getOperation(AuthParam authParam)
+   public String getOperation(MessageInfo messageInfo)
    { 
       throw new IllegalStateException("Not Implemented");
    }
@@ -108,5 +102,21 @@
    public List getClientAuthModules()
    {
       return modules ;
+   }
+ 
+
+   public String getAppContext()
+   { 
+      return this.contextId;
+   }
+
+   public String getAuthContextID(MessageInfo messageInfo)
+   {
+      throw new RuntimeException("Not Implemented");
+   }
+
+   public boolean isProtected()
+   { 
+      throw new RuntimeException("Not Implemented");
    } 
 }
\ No newline at end of file

Modified: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossClientAuthContext.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossClientAuthContext.java	2007-07-13 18:25:14 UTC (rev 64045)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossClientAuthContext.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -25,9 +25,9 @@
 import java.util.Map;
 
 import javax.security.auth.Subject;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.AuthParam;
+import javax.security.auth.message.AuthException; 
 import javax.security.auth.message.AuthStatus; 
+import javax.security.auth.message.MessageInfo;
 import javax.security.auth.message.config.ClientAuthContext;
 import javax.security.auth.message.module.ClientAuthModule; 
 
@@ -58,32 +58,27 @@
    /**
     * @see ClientAuth#cleanSubject(Subject, Map)
     */
-   public AuthStatus cleanSubject(Subject subject, Map sharedState) 
+   public void cleanSubject(MessageInfo messageInfo, Subject subject) 
    throws AuthException
    {
       AuthStatus status = null;
       Iterator iter = config.getClientAuthModules().iterator();
       while(iter.hasNext())
       {
-         status = ((ClientAuthModule)iter.next()).cleanSubject(subject,sharedState);
-         if(status == AuthStatus.FAIL)
-            break;
-      }
-      return status;
+         ((ClientAuthModule)iter.next()).cleanSubject(messageInfo,subject); 
+      } 
    }
    
    /**
     * @see ClientAuth#secureRequest(AuthParam, Subject, Map)
     */
-   public AuthStatus secureRequest(AuthParam authParam, Subject client, 
-         Map sharedState) throws AuthException
+   public AuthStatus secureRequest(MessageInfo messageInfo, Subject clientSubject) throws AuthException
    {
       Iterator iter = config.getClientAuthModules().iterator();
       AuthStatus status = null;
       while(iter.hasNext())
       {
-         status = ((ClientAuthModule)iter.next()).secureRequest(authParam,client,
-                                                                         sharedState);
+         status = ((ClientAuthModule)iter.next()).secureRequest(messageInfo,clientSubject);
          if(status == AuthStatus.FAIL)
             break;
       }
@@ -93,15 +88,15 @@
    /**
     * @see ClientAuth#validateResponse(AuthParam, Subject, Subject, Map)
     */
-   public AuthStatus validateResponse(AuthParam authParam, Subject client, 
-         Subject service, Map sharedState) throws AuthException
+   public AuthStatus validateResponse(MessageInfo messageInfo, Subject clientSubject, 
+         Subject serviceSubject) throws AuthException
    {
       Iterator iter = config.getClientAuthModules().iterator();
       AuthStatus status = null;
       while(iter.hasNext())
       {
-         status = ((ClientAuthModule)iter.next()).validateResponse(authParam,client,
-                                                                  service,sharedState);
+         status = ((ClientAuthModule)iter.next()).validateResponse(messageInfo,clientSubject,
+                                                                                serviceSubject);
          if(status == AuthStatus.FAIL)
             break;
       }

Modified: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossServerAuthConfig.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossServerAuthConfig.java	2007-07-13 18:25:14 UTC (rev 64045)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossServerAuthConfig.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -28,14 +28,14 @@
 import javax.management.JMException;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
+import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.AuthParam;
+import javax.security.auth.message.AuthException; 
+import javax.security.auth.message.MessageInfo;
 import javax.security.auth.message.config.ServerAuthConfig;
 import javax.security.auth.message.config.ServerAuthContext;
 
-import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.security.SecurityConstants;
+//import org.jboss.mx.util.MBeanServerLocator; 
 
 //$Id$
 
@@ -73,10 +73,11 @@
    /**
     * @see ServerAuthConfig#getAuthContext(String, Map)
     */
-   public ServerAuthContext getAuthContext(String operation, Map properties) 
+   public ServerAuthContext getAuthContext(String authContextID,
+         Subject serviceSubject, Map properties) 
    throws AuthException
    { 
-      MBeanServer server = MBeanServerLocator.locateJBoss(); 
+      /*MBeanServer server = MBeanServerLocator.locateJBoss(); 
       ServerAuthContext sc = null;
       if(layer.equals(SecurityConstants.SERVLET_LAYER))
       { 
@@ -94,13 +95,14 @@
             throw new AuthException(jme.toString());
          }
       } 
-      return sc;
+      return sc;*/
+      throw new RuntimeException("Not Implemented");
    }
  
    /**
     * @see AuthConfig#getContextID()
     */
-   public String getContextID()
+   public String getAppContext()
    { 
       return this.contextId;
    } 
@@ -116,7 +118,7 @@
    /**
     * @see AuthConfig#getOperation(AuthParam)
     */
-   public String getOperation(AuthParam authParam)
+   public String getOperation(MessageInfo authParam)
    {
       return null;
    }
@@ -132,5 +134,15 @@
    public List getServerAuthModules()
    {
       return this.modules ;
+   }
+
+   public String getAuthContextID(MessageInfo messageInfo)
+   {
+      throw new RuntimeException("Not Implemented");
+   }
+
+   public boolean isProtected()
+   {
+      throw new RuntimeException("Not Implemented");
    } 
 }

Modified: projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossServerAuthContext.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossServerAuthContext.java	2007-07-13 18:25:14 UTC (rev 64045)
+++ projects/security/security-jboss-sx/trunk/src/main/org/jboss/security/auth/message/config/JBossServerAuthContext.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -25,9 +25,9 @@
 import java.util.Map;
 
 import javax.security.auth.Subject;
-import javax.security.auth.message.AuthException;
-import javax.security.auth.message.AuthParam;
+import javax.security.auth.message.AuthException; 
 import javax.security.auth.message.AuthStatus; 
+import javax.security.auth.message.MessageInfo;
 import javax.security.auth.message.config.ServerAuthContext;
 import javax.security.auth.message.module.ServerAuthModule;
 
@@ -58,27 +58,25 @@
    /**
     * @see ServerAuth#cleanSubject(Subject, Map)
     */
-   public void cleanSubject(Subject subject, Map sharedState) throws AuthException
+   public void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException
    {
       Iterator iter = config.getServerAuthModules().iterator();
       while(iter.hasNext())
       {
-         ((ServerAuthModule)iter.next()).cleanSubject(subject,sharedState);
+         ((ServerAuthModule)iter.next()).cleanSubject(messageInfo,subject);
       }
    }
    
    /**
     * @see ServerAuth#secureResponse(AuthParam, Subject, Map)
     */
-   public AuthStatus secureResponse(AuthParam authParam, 
-         Subject service, Map sharedState) throws AuthException
+   public AuthStatus secureResponse(MessageInfo messageInfo, Subject serviceSubject) throws AuthException
    {
       Iterator iter = config.getServerAuthModules().iterator();
       AuthStatus status = null;
       while(iter.hasNext())
       {
-         status = ((ServerAuthModule)iter.next()).secureResponse(authParam,service,
-                                                                  sharedState);
+         status = ((ServerAuthModule)iter.next()).secureResponse(messageInfo,serviceSubject);
          if(status == AuthStatus.FAIL)
             break;
       }
@@ -88,15 +86,14 @@
    /**
     * @see ServerAuth#validateRequest(AuthParam, Subject, Subject, Map)
     */
-   public AuthStatus validateRequest(AuthParam authParam, Subject client, 
-         Subject service, Map sharedState) throws AuthException
+   public AuthStatus validateRequest(MessageInfo messageInfo, Subject clientSubject, 
+         Subject serviceSubject) throws AuthException
    {
       Iterator iter = config.getServerAuthModules().iterator();
       AuthStatus status = null;
       while(iter.hasNext())
       {
-         status = ((ServerAuthModule)iter.next()).validateRequest(authParam, client,
-                                                                 service, sharedState);
+         status = ((ServerAuthModule)iter.next()).validateRequest(messageInfo, clientSubject,serviceSubject);
          if(status == AuthStatus.FAIL)
             break;
       }

Added: projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/JASPIConfigUnitTestCase.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/JASPIConfigUnitTestCase.java	                        (rev 0)
+++ projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/JASPIConfigUnitTestCase.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -0,0 +1,77 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2007, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt 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.test.authentication.jaspi;
+
+import java.util.HashMap;
+
+import javax.security.auth.Subject;
+import javax.security.auth.message.MessageInfo;
+import javax.security.auth.message.config.AuthConfigFactory;
+import javax.security.auth.message.config.AuthConfigProvider;
+import javax.security.auth.message.config.ServerAuthConfig;
+import javax.security.auth.message.config.ServerAuthContext;
+
+import junit.framework.TestCase;
+
+import org.jboss.security.auth.callback.AppCallbackHandler;
+import org.jboss.security.auth.message.GenericMessageInfo;
+import org.jboss.test.authentication.jaspi.helpers.TestAuthConfigProvider;
+
+//$Id$
+
+/**
+ *  Unit Tests for the JASPI Configuration
+ *  @author Anil.Saldhana at redhat.com
+ *  @since  Jul 11, 2007 
+ *  @version $Revision$
+ */
+public class JASPIConfigUnitTestCase extends TestCase
+{
+   AuthConfigFactory factory = null;
+   
+   @Override
+   public void setUp()
+   {
+      factory = AuthConfigFactory.getFactory();
+      factory.registerConfigProvider(new TestAuthConfigProvider(), "TEST", "APP", 
+            "Test Config Provider");
+   }
+   
+   public void testFactoryConfig() throws Exception
+   { 
+      assertNotNull("AuthConfigFactory is ! null", factory); 
+      AuthConfigProvider provider = factory.getConfigProvider("TEST", "APP", null);
+      assertNotNull("AuthConfigProvider is ! null", provider);
+      
+      ServerAuthConfig serverConfig =
+         provider.getServerAuthConfig("TEST", "APP", 
+               new AppCallbackHandler("anil","anil".toCharArray()));
+      assertNotNull("ServerAuthConfig ! null", serverConfig); 
+      MessageInfo mi = new GenericMessageInfo(new Object(), new Object());
+      String authContextID = serverConfig.getAuthContextID(mi);
+      assertNotNull("AuthContext ID != null",authContextID);
+      ServerAuthContext sctx = serverConfig.getAuthContext(authContextID, 
+            new Subject(), new HashMap());
+      assertNotNull("ServerAuthContext != null",sctx);
+   } 
+    
+}

Added: projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestAuthConfigProvider.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestAuthConfigProvider.java	                        (rev 0)
+++ projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestAuthConfigProvider.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.authentication.jaspi.helpers;
+
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.config.AuthConfigProvider;
+import javax.security.auth.message.config.ClientAuthConfig;
+import javax.security.auth.message.config.ServerAuthConfig;
+
+//$Id$
+
+/**
+ *  Test AuthConfigProvider
+ *  @author Anil.Saldhana at redhat.com
+ *  @since  Jul 11, 2007 
+ *  @version $Revision$
+ */
+public class TestAuthConfigProvider implements AuthConfigProvider
+{
+   private CallbackHandler theHandler; 
+
+   public ClientAuthConfig getClientAuthConfig(String layer, 
+         String appcontext, CallbackHandler handler) throws AuthException,
+         SecurityException
+   { 
+      return null;
+   }
+
+   public ServerAuthConfig getServerAuthConfig(String layer, 
+         String appcontext, CallbackHandler handler) throws AuthException,
+         SecurityException
+   { 
+     return new TestServerAuthConfig() ;
+   }
+
+   public void refresh() throws AuthException, SecurityException
+   { 
+   }   
+}

Added: projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestServerAuthConfig.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestServerAuthConfig.java	                        (rev 0)
+++ projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestServerAuthConfig.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -0,0 +1,71 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2007, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt 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.test.authentication.jaspi.helpers;
+
+import java.util.Map;
+
+import javax.security.auth.Subject;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.MessageInfo;
+import javax.security.auth.message.config.ServerAuthConfig;
+import javax.security.auth.message.config.ServerAuthContext;
+
+//$Id$
+
+/**
+ *  Test ServerAuthConfig
+ *  @author Anil.Saldhana at redhat.com
+ *  @since  Jul 11, 2007 
+ *  @version $Revision$
+ */
+public class TestServerAuthConfig implements ServerAuthConfig
+{
+   public ServerAuthContext getAuthContext(String authContextID,
+         Subject serviceSubject, Map properties)
+   { 
+      return new TestServerAuthContext();
+   }
+
+   public String getAppContext()
+   { 
+      return null;
+   }
+
+   public String getAuthContextID(MessageInfo messageInfo)
+   { 
+      return "AUTHCONTEXTID";
+   }
+
+   public String getMessageLayer()
+   { 
+      return "TEST";
+   }
+
+   public boolean isProtected()
+   { 
+      return false;
+   }
+
+   public void refresh() throws AuthException, SecurityException
+   { 
+   } 
+}

Added: projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestServerAuthContext.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestServerAuthContext.java	                        (rev 0)
+++ projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/authentication/jaspi/helpers/TestServerAuthContext.java	2007-07-13 19:56:20 UTC (rev 64046)
@@ -0,0 +1,55 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2007, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt 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.test.authentication.jaspi.helpers;
+
+import javax.security.auth.Subject;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.AuthStatus;
+import javax.security.auth.message.MessageInfo;
+import javax.security.auth.message.config.ServerAuthContext;
+
+//$Id$
+
+/**
+ *  Test ServerAuthContext
+ *  @author Anil.Saldhana at redhat.com
+ *  @since  Jul 12, 2007 
+ *  @version $Revision$
+ */
+public class TestServerAuthContext implements ServerAuthContext
+{ 
+   public void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException
+   { 
+   }
+
+   public AuthStatus secureResponse(MessageInfo messageInfo, Subject subject) 
+   throws AuthException
+   { 
+      return null;
+   }
+
+   public AuthStatus validateRequest(MessageInfo messageInfo, Subject clientSubject, 
+         Subject serviceSubject) throws AuthException
+   { 
+      return null;
+   } 
+}




More information about the jboss-cvs-commits mailing list