[jboss-cvs] JBossAS SVN: r72650 - in projects/security/security-spi/tags: 2.0.2.Beta7 and 8 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Apr 23 21:17:23 EDT 2008
Author: anil.saldhana at jboss.com
Date: 2008-04-23 21:17:23 -0400 (Wed, 23 Apr 2008)
New Revision: 72650
Added:
projects/security/security-spi/tags/2.0.2.Beta7/
projects/security/security-spi/tags/2.0.2.Beta7/.classpath
projects/security/security-spi/tags/2.0.2.Beta7/acl/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/authorization/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/identity/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/IdentityFactory.java
projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/IdentityType.java
projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CertificateIdentity.java
projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CertificateIdentityFactory.java
projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentity.java
projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentityFactory.java
projects/security/security-spi/tags/2.0.2.Beta7/parent/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/spi/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/spi/src/main/org/jboss/security/SecurityContextUtil.java
projects/security/security-spi/tags/2.0.2.Beta7/spi/src/main/org/jboss/security/javaee/
Removed:
projects/security/security-spi/tags/2.0.2.Beta7/.classpath
projects/security/security-spi/tags/2.0.2.Beta7/acl/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/authorization/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/identity/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentity.java
projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentityFactory.java
projects/security/security-spi/tags/2.0.2.Beta7/parent/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/spi/pom.xml
projects/security/security-spi/tags/2.0.2.Beta7/spi/src/main/org/jboss/security/SecurityContextUtil.java
Log:
[maven-release-plugin] copy for tag 2.0.2.Beta7
Copied: projects/security/security-spi/tags/2.0.2.Beta7 (from rev 72024, projects/security/security-spi/trunk)
Deleted: projects/security/security-spi/tags/2.0.2.Beta7/.classpath
===================================================================
--- projects/security/security-spi/trunk/.classpath 2008-04-11 14:13:32 UTC (rev 72024)
+++ projects/security/security-spi/tags/2.0.2.Beta7/.classpath 2008-04-24 01:17:23 UTC (rev 72650)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="spi/src/tests"/>
- <classpathentry kind="src" path="acl/src/main"/>
- <classpathentry kind="src" path="identity/src/tests"/>
- <classpathentry kind="src" path="identity/src/main"/>
- <classpathentry kind="src" path="authorization/src/main"/>
- <classpathentry kind="src" path="spi/src/main"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0-BETA1/jboss-jaspi-api-1.0-BETA1.jar"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/security/authorization-spi/2.0.2-SNAPSHOT/authorization-spi-2.0.2-SNAPSHOT.jar"/>
- <classpathentry kind="output" path="target/eclipse-classes"/>
-</classpath>
Copied: projects/security/security-spi/tags/2.0.2.Beta7/.classpath (from rev 72457, projects/security/security-spi/trunk/.classpath)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/.classpath (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/.classpath 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="spi/src/tests"/>
+ <classpathentry kind="src" path="acl/src/main"/>
+ <classpathentry kind="src" path="identity/src/tests"/>
+ <classpathentry kind="src" path="identity/src/main"/>
+ <classpathentry kind="src" path="authorization/src/main"/>
+ <classpathentry kind="src" path="spi/src/main"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0-BETA1/jboss-jaspi-api-1.0-BETA1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/authorization-spi/2.0.2-SNAPSHOT/authorization-spi-2.0.2-SNAPSHOT.jar"/>
+ <classpathentry kind="output" path="target/eclipse-classes"/>
+</classpath>
Deleted: projects/security/security-spi/tags/2.0.2.Beta7/acl/pom.xml
===================================================================
--- projects/security/security-spi/trunk/acl/pom.xml 2008-04-11 14:13:32 UTC (rev 72024)
+++ projects/security/security-spi/tags/2.0.2.Beta7/acl/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -1,70 +0,0 @@
-<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.security</groupId>
- <artifactId>jboss-security-spi-parent</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>acl-spi</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>JBoss Security Access Control List SPI</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>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security-spi/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security-spi/trunk/</developerConnection>
- <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security-spi/trunk/</url>
- </scm>
- <build>
- <sourceDirectory>${basedir}/src/main</sourceDirectory>
- <testSourceDirectory>${basedir}/src/tests</testSourceDirectory>
- <testOutputDirectory>${basedir}/target/test-classes</testOutputDirectory>
- <finalName>${artifactId}</finalName>
- <outputDirectory>${basedir}/target/classes</outputDirectory>
- <resources>
- <resource>
- <directory>${basedir}</directory>
- <includes>
- <include>JBossORG-EULA.txt</include>
- </includes>
- </resource>
- </resources>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>identity-spi</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>authorization-spi</artifactId>
- </dependency>
- </dependencies>
- <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>
-</project>
\ No newline at end of file
Copied: projects/security/security-spi/tags/2.0.2.Beta7/acl/pom.xml (from rev 72649, projects/security/security-spi/trunk/acl/pom.xml)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/acl/pom.xml (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/acl/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,70 @@
+<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.security</groupId>
+ <artifactId>jboss-security-spi-parent</artifactId>
+ <version>2.0.2.Beta7</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>acl-spi</artifactId>
+ <version>2.0.2.Beta7</version>
+ <packaging>jar</packaging>
+ <name>JBoss Security Access Control List SPI</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>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</url>
+ </scm>
+ <build>
+ <sourceDirectory>${basedir}/src/main</sourceDirectory>
+ <testSourceDirectory>${basedir}/src/tests</testSourceDirectory>
+ <testOutputDirectory>${basedir}/target/test-classes</testOutputDirectory>
+ <finalName>${artifactId}</finalName>
+ <outputDirectory>${basedir}/target/classes</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>JBossORG-EULA.txt</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>identity-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>authorization-spi</artifactId>
+ </dependency>
+ </dependencies>
+ <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>
+</project>
\ No newline at end of file
Deleted: projects/security/security-spi/tags/2.0.2.Beta7/authorization/pom.xml
===================================================================
--- projects/security/security-spi/trunk/authorization/pom.xml 2008-04-11 14:13:32 UTC (rev 72024)
+++ projects/security/security-spi/tags/2.0.2.Beta7/authorization/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -1,70 +0,0 @@
-<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.security</groupId>
- <artifactId>jboss-security-spi-parent</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>authorization-spi</artifactId>
- <packaging>jar</packaging>
- <name>JBoss Security Authorization SPI</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>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security-spi/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security-spi/trunk/</developerConnection>
- <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security-spi/trunk/</url>
- </scm>
- <build>
- <sourceDirectory>${basedir}/src/main</sourceDirectory>
- <testSourceDirectory>${basedir}/src/tests</testSourceDirectory>
- <testOutputDirectory>${basedir}/target/test-classes</testOutputDirectory>
- <finalName>${artifactId}</finalName>
- <outputDirectory>${basedir}/target/classes</outputDirectory>
- <resources>
- <resource>
- <directory>${basedir}</directory>
- <includes>
- <include>JBossORG-EULA.txt</include>
- </includes>
- </resource>
- </resources>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>identity-spi</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <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>
-</project>
\ No newline at end of file
Copied: projects/security/security-spi/tags/2.0.2.Beta7/authorization/pom.xml (from rev 72649, projects/security/security-spi/trunk/authorization/pom.xml)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/authorization/pom.xml (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/authorization/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,70 @@
+<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.security</groupId>
+ <artifactId>jboss-security-spi-parent</artifactId>
+ <version>2.0.2.Beta7</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>authorization-spi</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Security Authorization SPI</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>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</url>
+ </scm>
+ <build>
+ <sourceDirectory>${basedir}/src/main</sourceDirectory>
+ <testSourceDirectory>${basedir}/src/tests</testSourceDirectory>
+ <testOutputDirectory>${basedir}/target/test-classes</testOutputDirectory>
+ <finalName>${artifactId}</finalName>
+ <outputDirectory>${basedir}/target/classes</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>JBossORG-EULA.txt</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>identity-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <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>
+</project>
\ No newline at end of file
Deleted: projects/security/security-spi/tags/2.0.2.Beta7/identity/pom.xml
===================================================================
--- projects/security/security-spi/trunk/identity/pom.xml 2008-04-11 14:13:32 UTC (rev 72024)
+++ projects/security/security-spi/tags/2.0.2.Beta7/identity/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -1,59 +0,0 @@
-<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.security</groupId>
- <artifactId>jboss-security-spi-parent</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>identity-spi</artifactId>
- <packaging>jar</packaging>
- <name>JBoss Security Identity SPI</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>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security-spi/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security-spi/trunk/</developerConnection>
- <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security-spi/trunk/</url>
- </scm>
- <build>
- <sourceDirectory>${basedir}/src/main</sourceDirectory>
- <testSourceDirectory>${basedir}/src/tests</testSourceDirectory>
- <testOutputDirectory>${basedir}/target/test-classes</testOutputDirectory>
- <finalName>${artifactId}</finalName>
- <outputDirectory>${basedir}/target/classes</outputDirectory>
- <resources>
- <resource>
- <directory>${basedir}</directory>
- <includes>
- <include>JBossORG-EULA.txt</include>
- </includes>
- </resource>
- </resources>
- </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>
-</project>
\ No newline at end of file
Copied: projects/security/security-spi/tags/2.0.2.Beta7/identity/pom.xml (from rev 72649, projects/security/security-spi/trunk/identity/pom.xml)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/identity/pom.xml (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/identity/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,59 @@
+<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.security</groupId>
+ <artifactId>jboss-security-spi-parent</artifactId>
+ <version>2.0.2.Beta7</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>identity-spi</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Security Identity SPI</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>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</url>
+ </scm>
+ <build>
+ <sourceDirectory>${basedir}/src/main</sourceDirectory>
+ <testSourceDirectory>${basedir}/src/tests</testSourceDirectory>
+ <testOutputDirectory>${basedir}/target/test-classes</testOutputDirectory>
+ <finalName>${artifactId}</finalName>
+ <outputDirectory>${basedir}/target/classes</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>JBossORG-EULA.txt</include>
+ </includes>
+ </resource>
+ </resources>
+ </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>
+</project>
\ No newline at end of file
Copied: projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/IdentityFactory.java (from rev 72639, projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/IdentityFactory.java)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/IdentityFactory.java (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/IdentityFactory.java 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,45 @@
+/*
+ * 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.security.identity;
+
+import org.jboss.security.identity.extensions.CertificateIdentityFactory;
+import org.jboss.security.identity.extensions.CredentialIdentityFactory;
+
+/**
+ * IdentityFactory to create Identities
+ * @author Anil.Saldhana at redhat.com
+ * @since Apr 23, 2008
+ * @version $Revision$
+ */
+public class IdentityFactory
+{
+ public static IdentityFactory getFactory(IdentityType type)
+ {
+ if(type == IdentityType.CREDENTIAL)
+ return CredentialIdentityFactory.getInstance();
+
+ if(type == IdentityType.CERTIFICATE)
+ return CertificateIdentityFactory.getInstance();
+
+ throw new RuntimeException("Not Yet Implemented:"+type.name());
+ }
+}
\ No newline at end of file
Copied: projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/IdentityType.java (from rev 72639, projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/IdentityType.java)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/IdentityType.java (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/IdentityType.java 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,33 @@
+/*
+ * 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.security.identity;
+
+/**
+ * Identity Type
+ * @author Anil.Saldhana at redhat.com
+ * @since Apr 23, 2008
+ * @version $Revision$
+ */
+public enum IdentityType
+{
+ CUSTOM,CREDENTIAL,CERTIFICATE,SAML,WSFED;
+}
\ No newline at end of file
Copied: projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CertificateIdentity.java (from rev 72640, projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/extensions/CertificateIdentity.java)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CertificateIdentity.java (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CertificateIdentity.java 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,34 @@
+/*
+ * 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.security.identity.extensions;
+
+import java.security.cert.X509Certificate;
+
+/**
+ * Represents an Identity using X509 certificates
+ * @author Anil.Saldhana at redhat.com
+ * @since Apr 23, 2008
+ * @version $Revision$
+ */
+public interface CertificateIdentity extends CredentialIdentity<X509Certificate[]>
+{
+}
\ No newline at end of file
Copied: projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CertificateIdentityFactory.java (from rev 72640, projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/extensions/CertificateIdentityFactory.java)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CertificateIdentityFactory.java (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CertificateIdentityFactory.java 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,89 @@
+/*
+ * 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.security.identity.extensions;
+
+import java.security.Principal;
+import java.security.acl.Group;
+import java.security.cert.X509Certificate;
+
+import org.jboss.security.identity.IdentityFactory;
+import org.jboss.security.identity.Role;
+
+/**
+ * Factory to create Certificate Identities
+ * @author Anil.Saldhana at redhat.com
+ * @since Apr 23, 2008
+ * @version $Revision$
+ */
+public class CertificateIdentityFactory extends IdentityFactory
+{
+ private static CertificateIdentityFactory _instance = null;
+
+ protected CertificateIdentityFactory()
+ {
+ }
+
+ public static CertificateIdentityFactory getInstance()
+ {
+ if(_instance == null)
+ _instance = new CertificateIdentityFactory();
+ return _instance;
+ }
+
+ public CertificateIdentity createIdentity(final Principal principal,
+ final X509Certificate[] certs, final Role roles)
+ {
+ return new CertificateIdentity()
+ {
+ private static final long serialVersionUID = 1L;
+
+ public X509Certificate[] getCredential()
+ {
+ return certs;
+ }
+
+ public void setCredential(X509Certificate[] certs)
+ {
+ }
+
+ public Group asGroup()
+ {
+ return null;
+ }
+
+ public Principal asPrincipal()
+ {
+ return principal;
+ }
+
+ public String getName()
+ {
+ return principal.getName();
+ }
+
+ public Role getRole()
+ {
+ return roles;
+ }
+ };
+ }
+}
\ No newline at end of file
Deleted: projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentity.java
===================================================================
--- projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentity.java 2008-04-11 14:13:32 UTC (rev 72024)
+++ projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentity.java 2008-04-24 01:17:23 UTC (rev 72650)
@@ -1,45 +0,0 @@
-/*
- * 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.security.identity.extensions;
-
-import org.jboss.security.identity.Identity;
-
-/**
- * An identity with credential
- * @author Anil.Saldhana at redhat.com
- * @since Feb 25, 2008
- * @version $Revision$
- */
-public interface CredentialIdentity extends Identity
-{
- /**
- * Return a credential
- * @return
- */
- Object getCredential();
-
- /**
- * Set a credential
- * @param credential
- */
- void setCredential(Object credential);
-}
Copied: projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentity.java (from rev 72640, projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentity.java)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentity.java (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentity.java 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,45 @@
+/*
+ * 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.security.identity.extensions;
+
+import org.jboss.security.identity.Identity;
+
+/**
+ * An identity with credential
+ * @author Anil.Saldhana at redhat.com
+ * @since Feb 25, 2008
+ * @version $Revision$
+ */
+public interface CredentialIdentity<T> extends Identity
+{
+ /**
+ * Return a credential
+ * @return
+ */
+ T getCredential();
+
+ /**
+ * Set a credential
+ * @param credential
+ */
+ void setCredential(T credential);
+}
Deleted: projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentityFactory.java
===================================================================
--- projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentityFactory.java 2008-04-11 14:13:32 UTC (rev 72024)
+++ projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentityFactory.java 2008-04-24 01:17:23 UTC (rev 72650)
@@ -1,78 +0,0 @@
-/*
- * 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.security.identity.extensions;
-
-import java.security.Principal;
-import java.security.acl.Group;
-
-import org.jboss.security.identity.Role;
-
-/**
- * Factory to create Credential Identity
- * @author Anil.Saldhana at redhat.com
- * @since Feb 25, 2008
- * @version $Revision$
- */
-public class CredentialIdentityFactory
-{
- public static CredentialIdentity createIdentity(final Principal principal,
- final Object cred)
- {
- return createIdentity(principal,cred, null);
- }
-
- public static CredentialIdentity createIdentity(final Principal principal,
- final Object cred, final Role roles)
- {
- return new CredentialIdentity()
- {
- public Object getCredential()
- {
- return cred;
- }
-
- public void setCredential(Object credential)
- {
- }
-
- public Group asGroup()
- {
- return null;
- }
-
- public Principal asPrincipal()
- {
- return principal;
- }
-
- public String getName()
- {
- return principal.getName();
- }
-
- public Role getRole()
- {
- return roles;
- }
- };
- }
-}
\ No newline at end of file
Copied: projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentityFactory.java (from rev 72640, projects/security/security-spi/trunk/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentityFactory.java)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentityFactory.java (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/identity/src/main/org/jboss/security/identity/extensions/CredentialIdentityFactory.java 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,94 @@
+/*
+ * 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.security.identity.extensions;
+
+import java.security.Principal;
+import java.security.acl.Group;
+
+import org.jboss.security.identity.IdentityFactory;
+import org.jboss.security.identity.Role;
+
+/**
+ * Factory to create Credential Identity
+ * @author Anil.Saldhana at redhat.com
+ * @since Feb 25, 2008
+ * @version $Revision$
+ */
+public class CredentialIdentityFactory extends IdentityFactory
+{
+ private static CredentialIdentityFactory _instance = null;
+
+ protected CredentialIdentityFactory()
+ {
+ }
+
+ public static CredentialIdentityFactory getInstance()
+ {
+ if(_instance == null)
+ _instance = new CredentialIdentityFactory();
+ return _instance;
+ }
+
+ public static CredentialIdentity<Object> createIdentity(final Principal principal,
+ final Object cred)
+ {
+ return createIdentity(principal,cred, null);
+ }
+
+ public static CredentialIdentity<Object> createIdentity(final Principal principal,
+ final Object cred, final Role roles)
+ {
+ return new CredentialIdentity<Object>()
+ {
+ private static final long serialVersionUID = 1L;
+
+ public Object getCredential()
+ {
+ return cred;
+ }
+
+ public void setCredential(Object credential)
+ {
+ }
+
+ public Group asGroup()
+ {
+ return null;
+ }
+
+ public Principal asPrincipal()
+ {
+ return principal;
+ }
+
+ public String getName()
+ {
+ return principal.getName();
+ }
+
+ public Role getRole()
+ {
+ return roles;
+ }
+ };
+ }
+}
\ No newline at end of file
Deleted: projects/security/security-spi/tags/2.0.2.Beta7/parent/pom.xml
===================================================================
--- projects/security/security-spi/trunk/parent/pom.xml 2008-04-11 14:13:32 UTC (rev 72024)
+++ projects/security/security-spi/tags/2.0.2.Beta7/parent/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -1,132 +0,0 @@
-<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>org.jboss.security</groupId>
- <artifactId>jboss-security-spi-parent</artifactId>
- <packaging>pom</packaging>
- <version>2.0.2-SNAPSHOT</version>
- <name>JBoss Security SPI - Parent</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>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-spi/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-spi/trunk</developerConnection>
- </scm>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jboss-deploy-plugin</artifactId>
- <version>1.6</version>
- <executions>
- <execution>
- <id>jboss-deploy</id>
- <goals>
- <goal>jboss-deploy</goal>
- </goals>
- <phase>deploy</phase>
- </execution>
- </executions>
- <configuration>
- <groupId>jboss</groupId>
- <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
- <removeArtifactVersion>true</removeArtifactVersion>
- </configuration>
- <inherited>true</inherited>
- </plugin>
- <plugin>
- <artifactId>maven-release-plugin</artifactId>
- <configuration>
- <tagBase>https://svn.jboss.org/repos/jbossas/projects/security/security-spi/tags</tagBase>
- </configuration>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <printSummary>true</printSummary>
- <disableXmlReport>false</disableXmlReport>
- <testFailureIgnore>true</testFailureIgnore>
- <includes>
- <include>**/**TestCase.java</include>
- </includes>
- <forkMode>pertest</forkMode>
- <argLine>${surefire.jvm.args}</argLine>
- <useFile>false</useFile>
- <trimStackTrace>false</trimStackTrace>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <layout>default</layout>
- <url>http://repository.jboss.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
-
- <repository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshots Repository</name>
- <layout>default</layout>
- <url>http://snapshots.jboss.org/maven2/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jaspi-api</artifactId>
- <version>1.0-BETA1</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>identity-spi</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>authorization-spi</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
-</project>
Copied: projects/security/security-spi/tags/2.0.2.Beta7/parent/pom.xml (from rev 72649, projects/security/security-spi/trunk/parent/pom.xml)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/parent/pom.xml (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/parent/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,137 @@
+<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>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi-parent</artifactId>
+ <packaging>pom</packaging>
+ <version>2.0.2.Beta7</version>
+ <name>JBoss Security SPI - Parent</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>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</developerConnection>
+ </scm>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jboss-deploy-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>jboss-deploy</id>
+ <goals>
+ <goal>jboss-deploy</goal>
+ </goals>
+ <phase>deploy</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <groupId>jboss</groupId>
+ <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
+ <removeArtifactVersion>true</removeArtifactVersion>
+ </configuration>
+ <inherited>true</inherited>
+ </plugin>
+ <plugin>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/jbossas/projects/security/security-spi/tags</tagBase>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <printSummary>true</printSummary>
+ <disableXmlReport>false</disableXmlReport>
+ <testFailureIgnore>true</testFailureIgnore>
+ <includes>
+ <include>**/**TestCase.java</include>
+ </includes>
+ <forkMode>pertest</forkMode>
+ <argLine>${surefire.jvm.args}</argLine>
+ <useFile>false</useFile>
+ <trimStackTrace>false</trimStackTrace>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jaspi-api</artifactId>
+ <version>1.0-BETA1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>identity-spi</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>authorization-spi</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
Deleted: projects/security/security-spi/tags/2.0.2.Beta7/pom.xml
===================================================================
--- projects/security/security-spi/trunk/pom.xml 2008-04-11 14:13:32 UTC (rev 72024)
+++ projects/security/security-spi/tags/2.0.2.Beta7/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -1,50 +0,0 @@
-<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.security</groupId>
- <artifactId>jboss-security-spi-parent</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- <relativePath>parent</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi</artifactId>
- <packaging>pom</packaging>
- <version>2.0.2-SNAPSHOT</version>
- <name>JBoss Security SPI - Aggregator</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>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-1</version>
- <executions>
- <execution>
- <phase>install</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <descriptors>
- <descriptor>assembly/bin.xml</descriptor>
- <descriptor>assembly/sources.xml</descriptor>
- </descriptors>
- </configuration>
- <inherited>false</inherited>
- </plugin>
- </plugins>
- </build>
-
- <modules>
- <module>parent</module>
- <module>identity</module>
- <module>authorization</module>
- <module>acl</module>
- <module>spi</module>
- </modules>
-
-</project>
Copied: projects/security/security-spi/tags/2.0.2.Beta7/pom.xml (from rev 72649, projects/security/security-spi/trunk/pom.xml)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/pom.xml (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,50 @@
+<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.security</groupId>
+ <artifactId>jboss-security-spi-parent</artifactId>
+ <version>2.0.2.Beta7</version>
+ <relativePath>parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi</artifactId>
+ <packaging>pom</packaging>
+ <version>2.0.2.Beta7</version>
+ <name>JBoss Security SPI - Aggregator</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>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-1</version>
+ <executions>
+ <execution>
+ <phase>install</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <descriptors>
+ <descriptor>assembly/bin.xml</descriptor>
+ <descriptor>assembly/sources.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <inherited>false</inherited>
+ </plugin>
+ </plugins>
+ </build>
+
+ <modules>
+ <module>parent</module>
+ <module>identity</module>
+ <module>authorization</module>
+ <module>acl</module>
+ <module>spi</module>
+ </modules>
+
+</project>
Deleted: projects/security/security-spi/tags/2.0.2.Beta7/spi/pom.xml
===================================================================
--- projects/security/security-spi/trunk/spi/pom.xml 2008-04-11 14:13:32 UTC (rev 72024)
+++ projects/security/security-spi/tags/2.0.2.Beta7/spi/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -1,63 +0,0 @@
-<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.security</groupId>
- <artifactId>jboss-security-spi-parent</artifactId>
- <version>2.0.2-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-security-spi-bare</artifactId>
- <packaging>jar</packaging>
- <name>JBoss Security SPI</name>
- <url>http://labs.jboss.org/portal/jbosssecurity/</url>
- <description>JBoss Security is a cross cutting project that handles security for the JEMS projects. The SPI Bare contains the SPI excluding the Authorization SPI.</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>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security-spi/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security-spi/trunk/</developerConnection>
- <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security-spi/trunk/</url>
- </scm>
- <build>
- <sourceDirectory>${basedir}/src/main</sourceDirectory>
- <testSourceDirectory>${basedir}/src/tests</testSourceDirectory>
- <testOutputDirectory>${basedir}/target/test-classes</testOutputDirectory>
- <finalName>${artifactId}</finalName>
- <outputDirectory>${basedir}/target/classes</outputDirectory>
- <resources>
- <resource>
- <directory>${basedir}</directory>
- <includes>
- <include>JBossORG-EULA.txt</include>
- </includes>
- </resource>
- </resources>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jaspi-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>identity-spi</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>authorization-spi</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
Copied: projects/security/security-spi/tags/2.0.2.Beta7/spi/pom.xml (from rev 72649, projects/security/security-spi/trunk/spi/pom.xml)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/spi/pom.xml (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/spi/pom.xml 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,67 @@
+<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.security</groupId>
+ <artifactId>jboss-security-spi-parent</artifactId>
+ <version>2.0.2.Beta7</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jboss-security-spi-bare</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Security SPI</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects. The SPI Bare contains the SPI excluding the Authorization SPI.</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>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security/security-spi/tags/2.0.2.Beta7</url>
+ </scm>
+ <build>
+ <sourceDirectory>${basedir}/src/main</sourceDirectory>
+ <testSourceDirectory>${basedir}/src/tests</testSourceDirectory>
+ <testOutputDirectory>${basedir}/target/test-classes</testOutputDirectory>
+ <finalName>${artifactId}</finalName>
+ <outputDirectory>${basedir}/target/classes</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>JBossORG-EULA.txt</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jaspi-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>identity-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>authorization-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Deleted: projects/security/security-spi/tags/2.0.2.Beta7/spi/src/main/org/jboss/security/SecurityContextUtil.java
===================================================================
--- projects/security/security-spi/trunk/spi/src/main/org/jboss/security/SecurityContextUtil.java 2008-04-11 14:13:32 UTC (rev 72024)
+++ projects/security/security-spi/tags/2.0.2.Beta7/spi/src/main/org/jboss/security/SecurityContextUtil.java 2008-04-24 01:17:23 UTC (rev 72650)
@@ -1,194 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, 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.security;
-
-import java.security.Principal;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-
-import org.jboss.security.identity.Identity;
-import org.jboss.security.identity.RoleGroup;
-
-
-/**
- * General Utility methods for dealing with the SecurityContext
- * @author <a href="mailto:Anil.Saldhana at jboss.org">Anil Saldhana</a>
- * @since Jan 5, 2007
- * @version $Revision$
- */
-public abstract class SecurityContextUtil
-{
- protected SecurityContext securityContext = null;
-
- public void setSecurityContext(SecurityContext sc)
- {
- this.securityContext = sc;
- }
-
- /**
- * Get the username from the security context
- * @return username
- */
- public abstract String getUserName();
-
- /**
- * Get the user principal the security context
- * @return user principal
- */
- public abstract Principal getUserPrincipal();
-
- /**
- * Get the credential
- * @return
- */
- public abstract Object getCredential();
-
- /**
- * Get the subject the security context
- * @return
- */
- public abstract Subject getSubject();
-
- /**
- * Get a holder of subject, runAs and caller RunAs
- * @return
- */
- public abstract SecurityIdentity getSecurityIdentity();
-
- /**
- * Inject subject, runAs and callerRunAs into the security context
- * Mainly used by integration code base to cache the security identity
- * and put back to the security context
- * @param si The SecurityIdentity Object
- */
- public abstract void setSecurityIdentity(SecurityIdentity si);
-
- /**
- * Get the Roles associated with the user for the
- * current security context
- * @param <T>
- * @return
- */
- public abstract RoleGroup getRoles();
-
- /**
- * Set the roles for the user for the current security context
- * @param <T>
- * @param roles
- */
- public abstract void setRoles(RoleGroup roles);
-
- /**
- * Create SubjectInfo and set it in the current security context
- * @param principal
- * @param credential
- * @param subject
- */
- public void createSubjectInfo(Principal principal, Object credential,Subject subject)
- {
- SubjectInfo si = new SubjectInfo(principal, credential, subject);
- this.securityContext.setSubjectInfo(si);
- }
-
- /**
- * Create a SubjectInfo
- * @param identity
- * @param theSubject The AuthenticatedSubject(can be null)
- */
- public void createSubjectInfo(Identity identity, Subject theSubject)
- {
- this.securityContext.setSubjectInfo(new SubjectInfo(identity, theSubject));
- }
-
- /**
- * Add an Identity to the Security Context
- * @param id
- */
- public void addIdentity(Identity id)
- {
- this.securityContext.getSubjectInfo().addIdentity(id);
- }
-
- /**
- * Get a set of identities of a particular type
- * @param clazz
- * @return
- */
- public Set<Identity> getIdentities(Class<?> clazz)
- {
- Set<Identity> resultSet = new HashSet<Identity>();
-
- Set<Identity> ids = this.securityContext.getSubjectInfo().getIdentities();
- if(ids != null)
- {
- Iterator<Identity> iter = ids.iterator();
- while(iter.hasNext())
- {
- Identity id = iter.next();
- if(clazz.isAssignableFrom(id.getClass()))
- resultSet.add(id);
- }
- }
- return resultSet;
- }
-
- /**
- * Set the Identities into the Security Context
- * @param idSet
- */
- public void setIdentities(Set<Identity> idSet)
- {
- this.securityContext.getSubjectInfo().setIdentities(idSet);
- }
-
- /**
- * Set an object on the Security Context
- * The context implementation may place the object in its internal
- * data structures (like the Data Map)
- * @param <T> Generic Type
- * @param sc Security Context Object
- * @param key Key representing the object being set
- * @param obj
- */
- public abstract <T> void set(String key, T obj);
-
- /**
- * Return an object from the Security Context
- * @param <T>
- * @param sc Security Context Object
- * @param key key identifies the type of object we are requesting
- * @return
- */
- public abstract <T> T get(String key);
-
- /**
- * Remove an object represented by the key from the security context
- * @param <T>
- * @param sc Security Context Object
- * @param key key identifies the type of object we are requesting
- * @return the removed object
- */
- public abstract <T> T remove(String key);
-}
\ No newline at end of file
Copied: projects/security/security-spi/tags/2.0.2.Beta7/spi/src/main/org/jboss/security/SecurityContextUtil.java (from rev 72647, projects/security/security-spi/trunk/spi/src/main/org/jboss/security/SecurityContextUtil.java)
===================================================================
--- projects/security/security-spi/tags/2.0.2.Beta7/spi/src/main/org/jboss/security/SecurityContextUtil.java (rev 0)
+++ projects/security/security-spi/tags/2.0.2.Beta7/spi/src/main/org/jboss/security/SecurityContextUtil.java 2008-04-24 01:17:23 UTC (rev 72650)
@@ -0,0 +1,216 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.security;
+
+import java.security.Principal;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.security.auth.Subject;
+
+import org.jboss.security.identity.Identity;
+import org.jboss.security.identity.RoleGroup;
+
+
+/**
+ * General Utility methods for dealing with the SecurityContext
+ * @author <a href="mailto:Anil.Saldhana at jboss.org">Anil Saldhana</a>
+ * @since Jan 5, 2007
+ * @version $Revision$
+ */
+public abstract class SecurityContextUtil
+{
+ protected SecurityContext securityContext = null;
+
+ public void setSecurityContext(SecurityContext sc)
+ {
+ this.securityContext = sc;
+ }
+
+ /**
+ * Get the username from the security context
+ * @return username
+ */
+ public abstract String getUserName();
+
+ /**
+ * Get the user principal the security context
+ * @return user principal
+ */
+ public abstract Principal getUserPrincipal();
+
+ /**
+ * Get the credential
+ * @return
+ */
+ public abstract Object getCredential();
+
+ /**
+ * Get the subject the security context
+ * @return
+ */
+ public abstract Subject getSubject();
+
+ /**
+ * Get a holder of subject, runAs and caller RunAs
+ * @return
+ */
+ public abstract SecurityIdentity getSecurityIdentity();
+
+ /**
+ * Inject subject, runAs and callerRunAs into the security context
+ * Mainly used by integration code base to cache the security identity
+ * and put back to the security context
+ * @param si The SecurityIdentity Object
+ */
+ public abstract void setSecurityIdentity(SecurityIdentity si);
+
+ /**
+ * Get the Roles associated with the user for the
+ * current security context
+ * @param <T>
+ * @return
+ */
+ public abstract RoleGroup getRoles();
+
+ /**
+ * Set the roles for the user for the current security context
+ * @param <T>
+ * @param roles
+ */
+ public abstract void setRoles(RoleGroup roles);
+
+ /**
+ * Create SubjectInfo and set it in the current security context
+ * @param principal
+ * @param credential
+ * @param subject
+ */
+ public void createSubjectInfo(Principal principal, Object credential,Subject subject)
+ {
+ SubjectInfo si = new SubjectInfo(principal, credential, subject);
+ this.securityContext.setSubjectInfo(si);
+ }
+
+ /**
+ * Create a SubjectInfo
+ * @param identity
+ * @param theSubject The AuthenticatedSubject(can be null)
+ */
+ public void createSubjectInfo(Identity identity, Subject theSubject)
+ {
+ this.securityContext.setSubjectInfo(new SubjectInfo(identity, theSubject));
+ }
+
+ /**
+ * Add an Identity to the Security Context
+ * @param id
+ */
+ public void addIdentity(Identity id)
+ {
+ this.securityContext.getSubjectInfo().addIdentity(id);
+ }
+
+ /**
+ * Clear Identities of a particular type
+ * @param clazz
+ */
+ public void clearIdentities(Class<?> clazz)
+ {
+ Set<Identity> resultSet = new HashSet<Identity>();
+
+ Set<Identity> ids = this.securityContext.getSubjectInfo().getIdentities();
+ if(ids != null)
+ {
+ Iterator<Identity> iter = ids.iterator();
+ while(iter.hasNext())
+ {
+ Identity id = iter.next();
+ if(clazz.isAssignableFrom(id.getClass()))
+ resultSet.add(id);
+ }
+ ids.removeAll(resultSet);
+ }
+ }
+
+ /**
+ * Get a set of identities of a particular type
+ * @param clazz
+ * @return
+ */
+ public Set<Identity> getIdentities(Class<?> clazz)
+ {
+ Set<Identity> resultSet = new HashSet<Identity>();
+
+ Set<Identity> ids = this.securityContext.getSubjectInfo().getIdentities();
+ if(ids != null)
+ {
+ Iterator<Identity> iter = ids.iterator();
+ while(iter.hasNext())
+ {
+ Identity id = iter.next();
+ if(clazz.isAssignableFrom(id.getClass()))
+ resultSet.add(id);
+ }
+ }
+ return resultSet;
+ }
+
+ /**
+ * Set the Identities into the Security Context
+ * @param idSet
+ */
+ public void setIdentities(Set<Identity> idSet)
+ {
+ this.securityContext.getSubjectInfo().setIdentities(idSet);
+ }
+
+ /**
+ * Set an object on the Security Context
+ * The context implementation may place the object in its internal
+ * data structures (like the Data Map)
+ * @param <T> Generic Type
+ * @param sc Security Context Object
+ * @param key Key representing the object being set
+ * @param obj
+ */
+ public abstract <T> void set(String key, T obj);
+
+ /**
+ * Return an object from the Security Context
+ * @param <T>
+ * @param sc Security Context Object
+ * @param key key identifies the type of object we are requesting
+ * @return
+ */
+ public abstract <T> T get(String key);
+
+ /**
+ * Remove an object represented by the key from the security context
+ * @param <T>
+ * @param sc Security Context Object
+ * @param key key identifies the type of object we are requesting
+ * @return the removed object
+ */
+ public abstract <T> T remove(String key);
+}
\ No newline at end of file
Copied: projects/security/security-spi/tags/2.0.2.Beta7/spi/src/main/org/jboss/security/javaee (from rev 72463, projects/security/security-spi/trunk/spi/src/main/org/jboss/security/javaee)
More information about the jboss-cvs-commits
mailing list