Picketlink SVN: r1265 - federation/trunk/picketlink-webapps/as7/assembly.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-09-26 14:50:16 -0400 (Mon, 26 Sep 2011)
New Revision: 1265
Modified:
federation/trunk/picketlink-webapps/as7/assembly/pom.xml
Log:
fix relative path
Modified: federation/trunk/picketlink-webapps/as7/assembly/pom.xml
===================================================================
--- federation/trunk/picketlink-webapps/as7/assembly/pom.xml 2011-09-26 18:26:29 UTC (rev 1264)
+++ federation/trunk/picketlink-webapps/as7/assembly/pom.xml 2011-09-26 18:50:16 UTC (rev 1265)
@@ -3,7 +3,7 @@
<groupId>org.picketlink</groupId>
<artifactId>picketlink-fed-parent</artifactId>
<version>2.0.2-SNAPSHOT</version>
- <relativePath>../../parent</relativePath>
+ <relativePath>../../../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.picketlink</groupId>
13 years, 3 months
Picketlink SVN: r1263 - in integration-tests/branches/product: ant-scripts and 7 other directories.
by picketlink-commits@lists.jboss.org
Author: pskopek(a)redhat.com
Date: 2011-09-26 13:29:45 -0400 (Mon, 26 Sep 2011)
New Revision: 1263
Added:
integration-tests/branches/product/picketlink-trust-eap5-cxf/
integration-tests/branches/product/picketlink-trust-eap5-cxf/pom.xml
integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/
integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/
integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/
integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/
integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/
integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/authorize-handlers.xml
integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/handlers.xml
integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/test-binary-handlers.xml
Removed:
integration-tests/branches/product/picketlink-trust-tests/src/test/resources/authorize-handlers.xml
integration-tests/branches/product/picketlink-trust-tests/src/test/resources/handlers.xml
integration-tests/branches/product/picketlink-trust-tests/src/test/resources/test-binary-handlers.xml
Modified:
integration-tests/branches/product/ant-scripts/ant-build.xml
integration-tests/branches/product/pom.xml
Log:
WS-trust CXF integration tests added.
Modified: integration-tests/branches/product/ant-scripts/ant-build.xml
===================================================================
--- integration-tests/branches/product/ant-scripts/ant-build.xml 2011-09-26 17:28:45 UTC (rev 1262)
+++ integration-tests/branches/product/ant-scripts/ant-build.xml 2011-09-26 17:29:45 UTC (rev 1263)
@@ -13,10 +13,10 @@
<property name="JBWS_CXF_HOME" location="${basedir}/target/jbossws-cxf-bin-dist/"/>
<property environment="env" />
- <property name="EAP_ZIP" value="jboss-eap-noauth-5.1.1.zip" />
- <property name="CXF_INSTALLER_ZIP" value="jboss-ep-ws-cxf-5.1.1-installer.zip" />
- <property name="EAP_URL" value="file:///opt/jboss-zips/${EAP_ZIP}" />
- <property name="CXF_INSTALLER_URL" value="file:///opt/jboss-zips/${CXF_INSTALLER_ZIP}" />
+ <property name="EAP_ZIP" value="jboss-eap-noauth-5.1.2-ER1.zip" />
+ <property name="CXF_INSTALLER_ZIP" value="jboss-ep-ws-cxf-5.1.2-ER1-installer.zip" />
+ <property name="EAP_URL" value="file:///mnt/jqa/eap/5.1.2.ER1/${EAP_ZIP}" />
+ <property name="CXF_INSTALLER_URL" value="file:///mnt/jqa/eap/5.1.2.ER1/${CXF_INSTALLER_ZIP}" />
<property name="DIST_DIR" value="${basedir}/../common-dist/target" />
<property name="EAP_DIR" value="jboss-eap-5.1" />
<property name="jboss.profile" value="default" />
Property changes on: integration-tests/branches/product/picketlink-trust-eap5-cxf
___________________________________________________________________
Added: svn:ignore
+ target
.classpath
.project
.settings
Added: integration-tests/branches/product/picketlink-trust-eap5-cxf/pom.xml
===================================================================
--- integration-tests/branches/product/picketlink-trust-eap5-cxf/pom.xml (rev 0)
+++ integration-tests/branches/product/picketlink-trust-eap5-cxf/pom.xml 2011-09-26 17:29:45 UTC (rev 1263)
@@ -0,0 +1,227 @@
+<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.picketlink.product</groupId>
+ <artifactId>picketlink-integration-tests-parent</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>picketlink-integration-trust-eap5-cxf</artifactId>
+ <packaging>jar</packaging>
+ <name>PicketLink Integration Tests for WS-Trust (STS) - Trust - EAP5 - WS CXF Stack</name>
+ <url>http://labs.jboss.org/portal/picketlink/</url>
+ <description>PicketLink Federation Tests to be run in a continuous integration environment such as Hudson</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>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <phase>test</phase>
+ <!-- <skipTests>true</skipTests> -->
+ <testClassesDirectory>${basedir}/../picketlink-trust-tests/target/test-classes</testClassesDirectory>
+ <testResourcesDirectory>${basedir}/../picketlink-trust-tests/target/test-classes</testResourcesDirectory>
+ <printSummary>true</printSummary>
+ <disableXmlReport>false</disableXmlReport>
+ <includes>
+ <include>**/ServletToWSTestCase.java</include>
+ <include>**/*XXTestCase.java</include>
+ </includes>
+ <forkMode>pertest</forkMode>
+ <argLine>-Djava.endorsed.dirs=${basedir}/target/jboss-5.1.0.GA/lib/endorsed</argLine>
+ <useFile>false</useFile>
+ <trimStackTrace>false</trimStackTrace>
+ <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
+ <classpathDependencyScopeExclude>compile</classpathDependencyScopeExclude>
+ <additionalClasspathElements>
+ <additionalClasspathElement>${eap-home}/client/jbosssx-client.jar</additionalClasspathElement>
+ <additionalClasspathElement>${eap-home}/client/jmx-invoker-adaptor-client.jar</additionalClasspathElement>
+ <additionalClasspathElement>${eap-home}/client/jbossall-client.jar</additionalClasspathElement>
+ <additionalClasspathElement>${eap-home}/client/jbossws-common.jar</additionalClasspathElement>
+ <additionalClasspathElement>${eap-home}/common/lib/picketlink-core-${pl-version}.jar</additionalClasspathElement>
+ <additionalClasspathElement>${eap-home}/lib/endorsed/xercesImpl.jar</additionalClasspathElement>
+
+ <additionalClasspathElement>${eap-home}/client/jbossws-cxf-client.jar</additionalClasspathElement>
+
+ <additionalClasspathElement>${eap-home}/client/jbossws-spi.jar</additionalClasspathElement>
+ <additionalClasspathElement>${eap-home}/client/jbossws-common.jar</additionalClasspathElement>
+ <additionalClasspathElement>${eap-home}/client/jboss-xml-binding.jar</additionalClasspathElement>
+ <additionalClasspathElement>${eap-home}/client/mail.jar</additionalClasspathElement>
+ <additionalClasspathElement>${eap-home}/client/wsdl4j.jar</additionalClasspathElement>
+ <additionalClasspathElement>${eap-home}/client/wstx.jar</additionalClasspathElement>
+ <additionalClasspathElement>${eap-home}/common/lib/servlet-api.jar</additionalClasspathElement>
+
+ </additionalClasspathElements>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>phase-1</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <property name="depclasspath" refid="maven.dependency.classpath"/>
+ <property name="version" value="${pl-version}"/>
+ <property name="pl-fed-webapps-assembly-version" value="${pl-fed-webapps-assembly-version}"/>
+ <property name="localRepository" value="${user.home}/.m2/repository"/>
+ <ant antfile="${basedir}/../ant-scripts/ant-build.xml" target="init-eap5-cxf" />
+ <ant antfile="${basedir}/../ant-scripts/ant-build.xml" target="copy-sts-props-eap5" />
+ <ant antfile="${basedir}/../ant-scripts/ant-build.xml" target="copy-trust-settings-eap5" />
+ <ant antfile="${basedir}/../ant-scripts/ant-build.xml" target="start-eap5" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>phase-2</id>
+ <phase>test</phase>
+ <configuration>
+ <tasks>
+ <property name="depclasspath" refid="maven.dependency.classpath"/>
+ <property name="version" value="${pl-version}"/>
+ <property name="localRepository" value="${user.home}/.m2/repository"/>
+ <ant antfile="${basedir}/../ant-scripts/ant-build.xml" target="stop-eap5" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.picketlink.product</groupId>
+ <artifactId>picketlink-core</artifactId>
+ <version>${pl-version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.picketlink</groupId>
+ <artifactId>picketlink-trust-jbossws</artifactId>
+ <version>${pl-trust-version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-client</artifactId>
+ <version>2.0.4.SP6</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <classifier>jmx-invoker-adaptor-client</classifier>
+ <version>5.1.0.GA</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>wutka-dtdparser</groupId>
+ <artifactId>dtdparser121</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <classifier>client</classifier>
+ <version>5.1.0.GA</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>httpunit</groupId>
+ <artifactId>httpunit</artifactId>
+ <version>1.7</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <version>1.6R7</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <dependency>
+ <groupId>nekohtml</groupId>
+ <artifactId>nekohtml</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>apache-xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>ant-contrib</groupId>
+ <artifactId>ant-contrib</artifactId>
+ <version>1.0b2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <doclet>org.jboss.apiviz.APIviz</doclet>
+ <docletArtifact>
+ <groupId>org.jboss.apiviz</groupId>
+ <artifactId>apiviz</artifactId>
+ <version>1.2.5.GA</version>
+ </docletArtifact>
+ <additionalparam>
+ -charset UTF-8
+ -docencoding UTF-8
+ -version
+ -author
+ -breakiterator
+ -windowtitle "${project.name} ${project.version} API Reference"
+ -doctitle "${project.name} ${project.version} API Reference"
+ -bottom "Copyright © ${project.inceptionYear}-Present ${project.organization.name}. All Rights Reserved."
+ -link http://java.sun.com/javase/6/docs/api/
+ -sourceclasspath ${project.build.outputDirectory}
+ </additionalparam>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Deleted: integration-tests/branches/product/picketlink-trust-tests/src/test/resources/authorize-handlers.xml
===================================================================
--- integration-tests/branches/product/picketlink-trust-tests/src/test/resources/authorize-handlers.xml 2011-09-26 17:28:45 UTC (rev 1262)
+++ integration-tests/branches/product/picketlink-trust-tests/src/test/resources/authorize-handlers.xml 2011-09-26 17:29:45 UTC (rev 1263)
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-
-<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
-
- <handler-chain>
-
-
- <handler>
- <handler-name>WSAuthorizationHandler</handler-name>
- <handler-class>org.picketlink.trust.jbossws.handler.WSAuthorizationHandler</handler-class>
- </handler>
-
- <handler>
- <handler-name>WSAuthenticationHandler</handler-name>
- <handler-class>org.picketlink.trust.jbossws.handler.WSAuthenticationHandler</handler-class>
- </handler>
-
- <handler>
- <handler-name>SAML2Handler</handler-name>
- <handler-class>org.picketlink.trust.jbossws.handler.SAML2Handler</handler-class>
- </handler>
-
-
- </handler-chain>
-
-
-</handler-chains>
\ No newline at end of file
Deleted: integration-tests/branches/product/picketlink-trust-tests/src/test/resources/handlers.xml
===================================================================
--- integration-tests/branches/product/picketlink-trust-tests/src/test/resources/handlers.xml 2011-09-26 17:28:45 UTC (rev 1262)
+++ integration-tests/branches/product/picketlink-trust-tests/src/test/resources/handlers.xml 2011-09-26 17:29:45 UTC (rev 1263)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-
-<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ns1="http://org.jboss.ws/jaxws/samples/logicalhandler"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
-
-
-
- <handler-chain>
- <handler>
- <handler-name>SAML2Handler</handler-name>
- <handler-class>org.picketlink.trust.jbossws.handler.SAML2Handler</handler-class>
- </handler>
- </handler-chain>
-
-
-</handler-chains>
\ No newline at end of file
Copied: integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/authorize-handlers.xml (from rev 1194, integration-tests/branches/product/picketlink-trust-tests/src/test/resources/authorize-handlers.xml)
===================================================================
--- integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/authorize-handlers.xml (rev 0)
+++ integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/authorize-handlers.xml 2011-09-26 17:29:45 UTC (rev 1263)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+
+
+ <handler>
+ <handler-name>WSAuthorizationHandler</handler-name>
+ <handler-class>org.picketlink.trust.jbossws.handler.WSAuthorizationHandler</handler-class>
+ </handler>
+
+ <handler>
+ <handler-name>WSAuthenticationHandler</handler-name>
+ <handler-class>org.picketlink.trust.jbossws.handler.WSAuthenticationHandler</handler-class>
+ </handler>
+
+ <handler>
+ <handler-name>SAML2Handler</handler-name>
+ <handler-class>org.picketlink.trust.jbossws.handler.SAML2Handler</handler-class>
+ </handler>
+
+
+ </handler-chain>
+
+
+</handler-chains>
\ No newline at end of file
Copied: integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/handlers.xml (from rev 1194, integration-tests/branches/product/picketlink-trust-tests/src/test/resources/handlers.xml)
===================================================================
--- integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/handlers.xml (rev 0)
+++ integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/handlers.xml 2011-09-26 17:29:45 UTC (rev 1263)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns1="http://org.jboss.ws/jaxws/samples/logicalhandler"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+
+
+ <handler-chain>
+ <handler>
+ <handler-name>SAML2Handler</handler-name>
+ <handler-class>org.picketlink.trust.jbossws.handler.SAML2Handler</handler-class>
+ </handler>
+ </handler-chain>
+
+
+</handler-chains>
\ No newline at end of file
Copied: integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/test-binary-handlers.xml (from rev 1194, integration-tests/branches/product/picketlink-trust-tests/src/test/resources/test-binary-handlers.xml)
===================================================================
--- integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/test-binary-handlers.xml (rev 0)
+++ integration-tests/branches/product/picketlink-trust-tests/src/test/resources/org/picketlink/test/trust/ws/test-binary-handlers.xml 2011-09-26 17:29:45 UTC (rev 1263)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns1="http://org.jboss.ws/jaxws/samples/logicalhandler"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+
+
+ <handler-chain>
+ <handler>
+ <handler-name>TestBinaryHandler</handler-name>
+ <handler-class>org.picketlink.test.trust.ws.handlers.TestBinaryHandler</handler-class>
+ </handler>
+ </handler-chain>
+
+
+</handler-chains>
\ No newline at end of file
Deleted: integration-tests/branches/product/picketlink-trust-tests/src/test/resources/test-binary-handlers.xml
===================================================================
--- integration-tests/branches/product/picketlink-trust-tests/src/test/resources/test-binary-handlers.xml 2011-09-26 17:28:45 UTC (rev 1262)
+++ integration-tests/branches/product/picketlink-trust-tests/src/test/resources/test-binary-handlers.xml 2011-09-26 17:29:45 UTC (rev 1263)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-
-<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ns1="http://org.jboss.ws/jaxws/samples/logicalhandler"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
-
-
-
- <handler-chain>
- <handler>
- <handler-name>TestBinaryHandler</handler-name>
- <handler-class>org.picketlink.test.trust.ws.handlers.TestBinaryHandler</handler-class>
- </handler>
- </handler-chain>
-
-
-</handler-chains>
\ No newline at end of file
Modified: integration-tests/branches/product/pom.xml
===================================================================
--- integration-tests/branches/product/pom.xml 2011-09-26 17:28:45 UTC (rev 1262)
+++ integration-tests/branches/product/pom.xml 2011-09-26 17:29:45 UTC (rev 1263)
@@ -27,6 +27,7 @@
<module>picketlink-trust-tests</module>
<module>picketlink-trust-eap5-native</module>
+ <module>picketlink-trust-eap5-cxf</module>
</modules>
</project>
13 years, 3 months
Picketlink SVN: r1262 - integration-tests/branches/product/parent.
by picketlink-commits@lists.jboss.org
Author: pskopek(a)redhat.com
Date: 2011-09-26 13:28:45 -0400 (Mon, 26 Sep 2011)
New Revision: 1262
Modified:
integration-tests/branches/product/parent/pom.xml
Log:
Properties for setting EAP distro zips externalized.
Modified: integration-tests/branches/product/parent/pom.xml
===================================================================
--- integration-tests/branches/product/parent/pom.xml 2011-09-26 16:17:28 UTC (rev 1261)
+++ integration-tests/branches/product/parent/pom.xml 2011-09-26 17:28:45 UTC (rev 1262)
@@ -33,6 +33,12 @@
<pl-fed-webapps-assembly-version>2.0.1-SNAPSHOT</pl-fed-webapps-assembly-version>
<maven.compiler.target>1.6</maven.compiler.target>
<eap-home>${basedir}/target/jboss-eap-5.1/jboss-as</eap-home>
+ <EAP_ZIP>jboss-eap-noauth-5.1.2-ER1.zip</EAP_ZIP>
+ <CXF_INSTALLER_ZIP>jboss-ep-ws-cxf-5.1.2-ER1-installer.zip</CXF_INSTALLER_ZIP>
+ <downloadURL.prefix>file:///mnt/jqa/eap/5.1.2.ER1</downloadURL.prefix>
+ <EAP_URL>${downloadURL.prefix}/${EAP_ZIP}</EAP_URL>
+ <CXF_INSTALLER_URL>${downloadURL.prefix}/${CXF_INSTALLER_ZIP}</CXF_INSTALLER_URL>
+ <jboss.profile>default</jboss.profile>
</properties>
@@ -154,7 +160,7 @@
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
- <version>2.0.2</version>
+ <version>2.1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
13 years, 3 months
Picketlink SVN: r1261 - in social/trunk: openid/src/main/java/org/picketlink/social/openid/auth and 26 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-09-26 12:17:28 -0400 (Mon, 26 Sep 2011)
New Revision: 1261
Modified:
social/trunk/assembly/
social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/
social/trunk/openid/src/main/java/org/picketlink/social/openid/constants/
social/trunk/social/
social/trunk/social/src/
social/trunk/social/src/main/
social/trunk/social/src/main/java/
social/trunk/social/src/main/java/org/
social/trunk/social/src/main/java/org/picketlink/
social/trunk/social/src/main/java/org/picketlink/social/
social/trunk/social/src/main/java/org/picketlink/social/auth/
social/trunk/social/src/main/java/org/picketlink/social/reg/
social/trunk/webapps/picketlink-reg/
social/trunk/webapps/picketlink-reg/resources/
social/trunk/webapps/picketlink-reg/resources/META-INF/
social/trunk/webapps/picketlink-reg/resources/WEB-INF/
social/trunk/webapps/picketlink-reg/resources/auth/
social/trunk/webapps/picketlink-reg/resources/auth/css/
social/trunk/webapps/picketlink-reg/resources/css/
social/trunk/webapps/picketlink-reg/resources/images/
social/trunk/webapps/picketlink-reg/src/
social/trunk/webapps/picketlink-reg/src/main/
social/trunk/webapps/picketlink-reg/src/main/webapp/
social/trunk/webapps/picketlink-reg/src/main/webapp/WEB-INF/
social/trunk/webapps/picketlink-reg/src/main/webapp/auth/
social/trunk/webapps/picketlink-reg/src/main/webapp/auth/css/
social/trunk/webapps/picketlink-reg/src/main/webapp/css/
social/trunk/webapps/picketlink-reg/src/main/webapp/images/
Log:
svn ig
Property changes on: social/trunk/assembly
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/openid/src/main/java/org/picketlink/social/openid/auth
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/openid/src/main/java/org/picketlink/social/openid/constants
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/social
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/social/src
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/social/src/main
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/social/src/main/java
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/social/src/main/java/org
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/social/src/main/java/org/picketlink
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/social/src/main/java/org/picketlink/social
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/social/src/main/java/org/picketlink/social/auth
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/social/src/main/java/org/picketlink/social/reg
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/resources
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/resources/META-INF
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/resources/WEB-INF
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/resources/auth
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/resources/auth/css
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/resources/css
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/resources/images
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/src
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/src/main
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/src/main/webapp
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/src/main/webapp/WEB-INF
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/src/main/webapp/auth
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/src/main/webapp/auth/css
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/src/main/webapp/css
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
Property changes on: social/trunk/webapps/picketlink-reg/src/main/webapp/images
___________________________________________________________________
Added: svn:ignore
+ .settings
target
target-eclipse
eclipse-target
.project
.classpath
.settings
.metadata
13 years, 3 months
Picketlink SVN: r1260 - social/trunk.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-09-26 12:16:25 -0400 (Mon, 26 Sep 2011)
New Revision: 1260
Modified:
social/trunk/pom.xml
Log:
add assembly
Modified: social/trunk/pom.xml
===================================================================
--- social/trunk/pom.xml 2011-09-26 16:15:18 UTC (rev 1259)
+++ social/trunk/pom.xml 2011-09-26 16:16:25 UTC (rev 1260)
@@ -18,6 +18,7 @@
<module>openid</module>
<module>facebook</module>
<module>social</module>
+ <module>assembly</module>
</modules>
<reporting>
13 years, 3 months
Picketlink SVN: r1258 - in social/trunk: assembly and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-09-26 12:12:25 -0400 (Mon, 26 Sep 2011)
New Revision: 1258
Added:
social/trunk/assembly/
social/trunk/assembly/bin.xml
social/trunk/assembly/pom.xml
social/trunk/assembly/sources.xml
Log:
assembly for 1 jar
Added: social/trunk/assembly/bin.xml
===================================================================
--- social/trunk/assembly/bin.xml (rev 0)
+++ social/trunk/assembly/bin.xml 2011-09-26 16:12:25 UTC (rev 1258)
@@ -0,0 +1,20 @@
+<assembly>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/../facebook/target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../social/target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../openid/target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
Property changes on: social/trunk/assembly/bin.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: social/trunk/assembly/pom.xml
===================================================================
--- social/trunk/assembly/pom.xml (rev 0)
+++ social/trunk/assembly/pom.xml 2011-09-26 16:12:25 UTC (rev 1258)
@@ -0,0 +1,63 @@
+<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.picketlink</groupId>
+ <artifactId>picketlink-social-parent</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.picketlink</groupId>
+ <artifactId>picketlink-consolidated-social</artifactId>
+ <packaging>pom</packaging>
+ <name>PicketLink social- Assembly</name>
+ <url>http://www.picketlink.org/</url>
+ <description>PicketLink social</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>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Specification-Title>PicketLink</Specification-Title>
+ <Specification-Version>${project.version}</Specification-Version>
+ <Specification-Vendor>Red Hat Middleware LLC</Specification-Vendor>
+ <Implementation-Title>JBoss Identity</Implementation-Title>
+ <Implementation-Version>${project.version}</Implementation-Version>
+ <Implementation-VendorId>org.jboss.security</Implementation-VendorId>
+ <Implementation-Vendor>Red Hat Middleware LLC</Implementation-Vendor>
+ <Implementation-URL>http://picketlink.org/</Implementation-URL>
+ </manifestEntries>
+ </archive>
+ <descriptors>
+ <descriptor>bin.xml</descriptor>
+ <descriptor>sources.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <inherited>false</inherited>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: social/trunk/assembly/sources.xml
===================================================================
--- social/trunk/assembly/sources.xml (rev 0)
+++ social/trunk/assembly/sources.xml 2011-09-26 16:12:25 UTC (rev 1258)
@@ -0,0 +1,22 @@
+<assembly>
+ <id>sources</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/../facebook/src/main/java</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../openid/src/main/java</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../social/src/main/java</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ </fileSets>
+
+</assembly>
Property changes on: social/trunk/assembly/sources.xml
___________________________________________________________________
Added: svn:executable
+ *
13 years, 3 months
Picketlink SVN: r1257 - in social/trunk: openid/src/main/java/org/picketlink/social/openid/auth and 2 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-09-26 12:11:45 -0400 (Mon, 26 Sep 2011)
New Revision: 1257
Added:
social/trunk/social/src/main/java/org/picketlink/social/auth/SecurityActions.java
Modified:
social/trunk/facebook/src/main/java/org/picketlink/social/facebook/FacebookAuthenticator.java
social/trunk/facebook/src/main/java/org/picketlink/social/facebook/SecurityActions.java
social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/OpenIDConsumerAuthenticator.java
social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/SecurityActions.java
social/trunk/social/src/main/java/org/picketlink/social/auth/ExternalAuthenticator.java
social/trunk/social/src/main/java/org/picketlink/social/reg/RegistrationValve.java
Log:
authenticator changes
Modified: social/trunk/facebook/src/main/java/org/picketlink/social/facebook/FacebookAuthenticator.java
===================================================================
--- social/trunk/facebook/src/main/java/org/picketlink/social/facebook/FacebookAuthenticator.java 2011-09-24 04:27:47 UTC (rev 1256)
+++ social/trunk/facebook/src/main/java/org/picketlink/social/facebook/FacebookAuthenticator.java 2011-09-26 16:11:45 UTC (rev 1257)
@@ -22,10 +22,13 @@
package org.picketlink.social.facebook;
import java.io.IOException;
+import java.lang.reflect.Method;
import java.security.Principal;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -64,10 +67,13 @@
private enum STATES { AUTH, AUTHZ, FINISH};
protected FacebookProcessor processor;
+
+ //Incompatibilities in register() method across JBossWeb versions
+ private Method theSuperRegisterMethod = null;
public void setReturnURL(String returnURL)
{
- this.returnURL = returnURL;
+ this.returnURL = getSystemPropertyAsString(returnURL);
}
public void setClientID(String clientID)
@@ -106,8 +112,6 @@
this.saveRestoreRequest = saveRestoreRequest;
}
-
- @Override
public void start() throws LifecycleException
{
//Validate the input values
@@ -128,6 +132,25 @@
throw new IOException("Not of type Catalina response");
return authenticate((Request)request, (Response)response, loginConfig);
}
+
+ /**
+ * Authenticate the request
+ * @param request
+ * @param response
+ * @param config
+ * @return
+ * @throws IOException
+ * @throws {@link RuntimeException} when the response is not of type catalina response object
+ */
+ public boolean authenticate(Request request, HttpServletResponse response, LoginConfig config) throws IOException
+ {
+ if (response instanceof Response)
+ {
+ Response catalinaResponse = (Response) response;
+ return authenticate(request, catalinaResponse, config);
+ }
+ throw new RuntimeException("Wrong type of response:"+response);
+ }
public boolean authenticate(Request request, Response response, LoginConfig loginConfig) throws IOException
{
@@ -175,11 +198,107 @@
{
this.restoreRequest(request, request.getSessionInternal());
}
- register(request, response, principal, Constants.FORM_METHOD, userName, "");
+
+ registerWithAuthenticatorBase(request,response,principal,userName);
+
request.getSession().setAttribute("STATE", STATES.FINISH.name());
return true;
}
return false;
}
+
+
+
+ protected void registerWithAuthenticatorBase(Request request, Response response, Principal principal, String userName)
+ {
+ try
+ {
+ register(request, response, principal, Constants.FORM_METHOD, userName, "");
+ }
+ catch(NoSuchMethodError nse)
+ {
+ if(theSuperRegisterMethod == null)
+ {
+ Class<?>[] args = new Class[]
+ {Request.class, HttpServletResponse.class, Principal.class, String.class, String.class, String.class};
+ Class<?> superClass = getClass().getSuperclass();
+ theSuperRegisterMethod = SecurityActions.getMethod(superClass, "register", args);
+
+ }
+ if(theSuperRegisterMethod != null)
+ {
+ Object[] objectArgs = new Object[] {request, response.getResponse(),
+ principal, Constants.FORM_METHOD,
+ userName, FacebookProcessor.EMPTY_PASSWORD };
+ try
+ {
+ theSuperRegisterMethod.invoke(this, objectArgs);
+ }
+ catch (Exception e)
+ {
+ log.error("Unable to register:", e);
+ }
+ }
+ }
+ }
+
+ /**
+ * <p>
+ * Get the system property value if the string is of the format ${sysproperty}
+ * </p>
+ * <p>
+ * You can insert default value when the system property is not set, by
+ * separating it at the beginning with ::
+ * </p>
+ * <p>
+ * <b>Examples:</b>
+ * </p>
+ *
+ * <p>
+ * ${idp} should resolve to a value if the system property "idp" is set.
+ * </p>
+ * <p>
+ * ${idp::http://localhost:8080} will resolve to http://localhost:8080 if the system property "idp" is not set.
+ * </p>
+ * @param str
+ * @return
+ */
+ protected String getSystemPropertyAsString(String str)
+ {
+ if (str == null)
+ throw new IllegalArgumentException("str is null");
+ if (str.contains("${"))
+ {
+ Pattern pattern = Pattern.compile("\\$\\{([^}]+)}");
+ Matcher matcher = pattern.matcher(str);
+
+ StringBuffer buffer = new StringBuffer();
+ String sysPropertyValue = null;
+
+ while (matcher.find())
+ {
+ String subString = matcher.group(1);
+ String defaultValue = "";
+
+ //Look for default value
+ if (subString.contains("::"))
+ {
+ int index = subString.indexOf("::");
+ defaultValue = subString.substring(index + 2);
+ subString = subString.substring(0, index);
+ }
+ sysPropertyValue = SecurityActions.getSystemProperty(subString, defaultValue);
+ if (sysPropertyValue.isEmpty())
+ {
+ throw new IllegalArgumentException(matcher.group(1) + " is missing in system properties");
+ }
+ matcher.appendReplacement(buffer, sysPropertyValue);
+ }
+
+ matcher.appendTail(buffer);
+ str = buffer.toString();
+ }
+ return str;
+ }
}
\ No newline at end of file
Modified: social/trunk/facebook/src/main/java/org/picketlink/social/facebook/SecurityActions.java
===================================================================
--- social/trunk/facebook/src/main/java/org/picketlink/social/facebook/SecurityActions.java 2011-09-24 04:27:47 UTC (rev 1256)
+++ social/trunk/facebook/src/main/java/org/picketlink/social/facebook/SecurityActions.java 2011-09-26 16:11:45 UTC (rev 1257)
@@ -21,6 +21,7 @@
*/
package org.picketlink.social.facebook;
+import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedAction;
@@ -89,5 +90,47 @@
}
});
}
-
+
+ /**
+ * Get the system property
+ * @param key
+ * @param defaultValue
+ * @return
+ */
+ static String getSystemProperty(final String key, final String defaultValue)
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<String>()
+ {
+ public String run()
+ {
+ return System.getProperty(key, defaultValue);
+ }
+ });
+ }
+
+ /**
+ * Use reflection to get the {@link Method} on a {@link Class} with the
+ * given parameter types
+ * @param clazz
+ * @param methodName
+ * @param parameterTypes
+ * @return
+ */
+ static Method getMethod(final Class<?> clazz, final String methodName, final Class<?>[] parameterTypes)
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<Method>()
+ {
+ public Method run()
+ {
+ try
+ {
+ return clazz.getDeclaredMethod(methodName, parameterTypes);
+ }
+ catch (Exception e)
+ {
+ return null;
+ }
+ }
+ });
+ }
}
\ No newline at end of file
Modified: social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/OpenIDConsumerAuthenticator.java
===================================================================
--- social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/OpenIDConsumerAuthenticator.java 2011-09-24 04:27:47 UTC (rev 1256)
+++ social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/OpenIDConsumerAuthenticator.java 2011-09-26 16:11:45 UTC (rev 1257)
@@ -22,6 +22,7 @@
package org.picketlink.social.openid.auth;
import java.io.IOException;
+import java.lang.reflect.Method;
import java.security.Principal;
import java.util.ArrayList;
import java.util.List;
@@ -68,10 +69,13 @@
protected boolean saveRestoreRequest = true;
protected OpenIDProcessor processor = null;
+
+ //Incompatibilities in register() method across JBossWeb versions
+ private Method theSuperRegisterMethod = null;
public void setReturnURL(String returnURL)
{
- this.returnURL = returnURL;
+ this.returnURL = StringUtil.getSystemPropertyAsString(returnURL);
}
public void setRequiredAttributes(String requiredAttributes)
@@ -104,7 +108,7 @@
roles.add(token);
}
}
-
+
public boolean authenticate(HttpServletRequest request, HttpServletResponse response, LoginConfig loginConfig) throws IOException
{
if(request instanceof Request == false)
@@ -114,6 +118,25 @@
return authenticate((Request)request, (Response)response, loginConfig);
}
+ /**
+ * Authenticate the request
+ * @param request
+ * @param response
+ * @param config
+ * @return
+ * @throws IOException
+ * @throws {@link RuntimeException} when the response is not of type catalina response object
+ */
+ public boolean authenticate(Request request, HttpServletResponse response, LoginConfig config) throws IOException
+ {
+ if (response instanceof Response)
+ {
+ Response catalinaResponse = (Response) response;
+ return authenticate(request, catalinaResponse, config);
+ }
+ throw new RuntimeException("Wrong type of response:"+response);
+ }
+
public boolean authenticate(Request request, Response response, LoginConfig loginConfig) throws IOException
{
if(processor == null)
@@ -174,9 +197,45 @@
if(trace)
log.trace("Logged in as:" + principal);
- register(request, response, principal, Constants.FORM_METHOD, principalName, "");
+
+ registerWithAuthenticatorBase(request,response,principal,principalName);
+
+ request.getSession().setAttribute("STATE", STATES.FINISH.name());
return true;
}
return false;
}
+
+ protected void registerWithAuthenticatorBase(Request request, Response response, Principal principal, String userName)
+ {
+ try
+ {
+ register(request, response, principal, Constants.FORM_METHOD, userName, "");
+ }
+ catch(NoSuchMethodError nse)
+ {
+ if(theSuperRegisterMethod == null)
+ {
+ Class<?>[] args = new Class[]
+ {Request.class, HttpServletResponse.class, Principal.class, String.class, String.class, String.class};
+ Class<?> superClass = getClass().getSuperclass();
+ theSuperRegisterMethod = SecurityActions.getMethod(superClass, "register", args);
+
+ }
+ if(theSuperRegisterMethod != null)
+ {
+ Object[] objectArgs = new Object[] {request, response.getResponse(),
+ principal, Constants.FORM_METHOD,
+ userName, OpenIDProcessor.EMPTY_PASSWORD };
+ try
+ {
+ theSuperRegisterMethod.invoke(this, objectArgs);
+ }
+ catch (Exception e)
+ {
+ log.error("Unable to register:", e);
+ }
+ }
+ }
+ }
}
\ No newline at end of file
Modified: social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/SecurityActions.java
===================================================================
--- social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/SecurityActions.java 2011-09-24 04:27:47 UTC (rev 1256)
+++ social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/SecurityActions.java 2011-09-26 16:11:45 UTC (rev 1257)
@@ -21,6 +21,7 @@
*/
package org.picketlink.social.openid.auth;
+import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedAction;
@@ -89,5 +90,32 @@
}
});
}
+
+ /**
+ * Use reflection to get the {@link Method} on a {@link Class} with the
+ * given parameter types
+ * @param clazz
+ * @param methodName
+ * @param parameterTypes
+ * @return
+ */
+ static Method getMethod(final Class<?> clazz, final String methodName, final Class<?>[] parameterTypes)
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<Method>()
+ {
+ public Method run()
+ {
+ try
+ {
+ return clazz.getDeclaredMethod(methodName, parameterTypes);
+ }
+ catch (Exception e)
+ {
+ return null;
+ }
+ }
+ });
+ }
+
}
\ No newline at end of file
Modified: social/trunk/social/src/main/java/org/picketlink/social/auth/ExternalAuthenticator.java
===================================================================
--- social/trunk/social/src/main/java/org/picketlink/social/auth/ExternalAuthenticator.java 2011-09-24 04:27:47 UTC (rev 1256)
+++ social/trunk/social/src/main/java/org/picketlink/social/auth/ExternalAuthenticator.java 2011-09-26 16:11:45 UTC (rev 1257)
@@ -22,6 +22,7 @@
package org.picketlink.social.auth;
import java.io.IOException;
+import java.lang.reflect.Method;
import java.security.Principal;
import java.util.ArrayList;
import java.util.List;
@@ -38,6 +39,7 @@
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.LoginConfig;
import org.apache.log4j.Logger;
+import org.picketlink.identity.federation.core.util.StringUtil;
import org.picketlink.social.facebook.FacebookProcessor;
import org.picketlink.social.openid.auth.OpenIDConsumerAuthenticator;
import org.picketlink.social.openid.auth.OpenIDProcessor;
@@ -76,6 +78,9 @@
protected boolean saveRestoreRequest = true;
private enum STATES { AUTH, AUTHZ, FINISH};
+
+ //Incompatibilities in register() method across JBossWeb versions
+ private Method theSuperRegisterMethod = null;
/**
* A comma separated string that represents the roles the web app
@@ -86,7 +91,7 @@
{
if(roleStr == null)
throw new RuntimeException("Role String is null in configuration");
- StringTokenizer st = new StringTokenizer(roleStr, ",");
+ StringTokenizer st = new StringTokenizer(StringUtil.getSystemPropertyAsString(roleStr), ",");
while(st.hasMoreElements())
{
roles.add(st.nextToken());
@@ -100,21 +105,40 @@
protected List<String> roles = new ArrayList<String>();
+ /**
+ * Set the url where the 3rd party authentication service will redirect after authentication
+ * @param returnURL
+ */
public void setReturnURL(String returnURL)
{
- this.returnURL = returnURL;
+ this.returnURL = StringUtil.getSystemPropertyAsString(returnURL);
}
+
+ /**
+ * Set the client id for facebook
+ * @param clientID
+ */
public void setClientID(String clientID)
{
- this.clientID = clientID;
+ this.clientID = StringUtil.getSystemPropertyAsString(clientID);
}
+
+ /**
+ * Set the client secret for facebook
+ * @param clientSecret
+ */
public void setClientSecret(String clientSecret)
{
- this.clientSecret = clientSecret;
+ this.clientSecret = StringUtil.getSystemPropertyAsString(clientSecret);
}
+
+ /**
+ * Set the scope for facebook (Default: email)
+ * @param facebookScope
+ */
public void setFacebookScope(String facebookScope)
{
- this.facebookScope = facebookScope;
+ this.facebookScope = StringUtil.getSystemPropertyAsString(facebookScope);
}
public boolean authenticate(HttpServletRequest request, HttpServletResponse response, LoginConfig loginConfig) throws IOException
@@ -125,6 +149,25 @@
throw new IOException("Not of type Catalina response");
return authenticate((Request)request, (Response)response, loginConfig);
}
+
+ /**
+ * Authenticate the request
+ * @param request
+ * @param response
+ * @param config
+ * @return
+ * @throws IOException
+ * @throws {@link RuntimeException} when the response is not of type catalina response object
+ */
+ public boolean authenticate(Request request, HttpServletResponse response, LoginConfig config) throws IOException
+ {
+ if (response instanceof Response)
+ {
+ Response catalinaResponse = (Response) response;
+ return authenticate(request, catalinaResponse, config);
+ }
+ throw new RuntimeException("Wrong type of response:"+response);
+ }
public boolean authenticate(Request request, Response response, LoginConfig loginConfig) throws IOException
{
@@ -204,7 +247,8 @@
{
this.restoreRequest(request, request.getSessionInternal());
}
- register(request, response, principal, Constants.FORM_METHOD, userName, "");
+ registerWithAuthenticatorBase(request,response,principal,userName);
+
request.getSession().setAttribute("STATE", STATES.FINISH.name());
return true;
@@ -267,9 +311,42 @@
if(trace)
log.trace("Logged in as:" + principal);
- register(request, response, principal, Constants.FORM_METHOD, principalName, "");
+ registerWithAuthenticatorBase(request,response,principal,principalName);
return true;
}
return false;
}
+
+ protected void registerWithAuthenticatorBase(Request request, Response response, Principal principal, String userName)
+ {
+ try
+ {
+ register(request, response, principal, Constants.FORM_METHOD, userName, "");
+ }
+ catch(NoSuchMethodError nse)
+ {
+ if(theSuperRegisterMethod == null)
+ {
+ Class<?>[] args = new Class[]
+ {Request.class, HttpServletResponse.class, Principal.class, String.class, String.class, String.class};
+ Class<?> superClass = getClass().getSuperclass();
+ theSuperRegisterMethod = SecurityActions.getMethod(superClass, "register", args);
+
+ }
+ if(theSuperRegisterMethod != null)
+ {
+ Object[] objectArgs = new Object[] {request, response.getResponse(),
+ principal, Constants.FORM_METHOD,
+ userName, FacebookProcessor.EMPTY_PASSWORD };
+ try
+ {
+ theSuperRegisterMethod.invoke(this, objectArgs);
+ }
+ catch (Exception e)
+ {
+ log.error("Unable to register:", e);
+ }
+ }
+ }
+ }
}
\ No newline at end of file
Added: social/trunk/social/src/main/java/org/picketlink/social/auth/SecurityActions.java
===================================================================
--- social/trunk/social/src/main/java/org/picketlink/social/auth/SecurityActions.java (rev 0)
+++ social/trunk/social/src/main/java/org/picketlink/social/auth/SecurityActions.java 2011-09-26 16:11:45 UTC (rev 1257)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.social.auth;
+
+import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * Privileged Blocks
+ * @author Anil Saldhana
+ * @since Sep 26, 2011
+ */
+class SecurityActions
+{
+ /**
+ * Use reflection to get the {@link Method} on a {@link Class} with the
+ * given parameter types
+ * @param clazz
+ * @param methodName
+ * @param parameterTypes
+ * @return
+ */
+ static Method getMethod(final Class<?> clazz, final String methodName, final Class<?>[] parameterTypes)
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<Method>()
+ {
+ public Method run()
+ {
+ try
+ {
+ return clazz.getDeclaredMethod(methodName, parameterTypes);
+ }
+ catch (Exception e)
+ {
+ return null;
+ }
+ }
+ });
+ }
+}
\ No newline at end of file
Modified: social/trunk/social/src/main/java/org/picketlink/social/reg/RegistrationValve.java
===================================================================
--- social/trunk/social/src/main/java/org/picketlink/social/reg/RegistrationValve.java 2011-09-24 04:27:47 UTC (rev 1256)
+++ social/trunk/social/src/main/java/org/picketlink/social/reg/RegistrationValve.java 2011-09-26 16:11:45 UTC (rev 1257)
@@ -55,38 +55,38 @@
throw new IOException("Not of type Catalina response");
invoke((Request)request, (Response)response);
}
-
+
public void invoke(Request request, Response response) throws IOException, ServletException
{
HttpSession session = request.getSession();
Principal principal = (Principal) session.getAttribute("PRINCIPAL");
- if(principal == null)
- throw new ServletException("User is not authenticated using the social authenticator");
- UserRegistration user = null;
- if(principal instanceof OpenIdPrincipal)
+ if(principal != null)
{
- user = processOpenIDPrincipal((OpenIdPrincipal) principal);
+ UserRegistration user = null;
+ if(principal instanceof OpenIdPrincipal)
+ {
+ user = processOpenIDPrincipal((OpenIdPrincipal) principal);
+ }
+ else if(principal instanceof FacebookPrincipal)
+ {
+ user = processFacebookPrincipal((FacebookPrincipal) principal);
+ }
+ else
+ throw new ServletException("Unknown principal type:" + principal);
+ if(user != null)
+ {
+ session.setAttribute("user", user);
+ }
}
- else if(principal instanceof FacebookPrincipal)
- {
- user = processFacebookPrincipal((FacebookPrincipal) principal);
- }
- else
- throw new ServletException("Unknown principal type:" + principal);
- if(user != null)
- {
- session.setAttribute("user", user);
- }
-
getNext().invoke(request, response);
}
-
+
private UserRegistration processOpenIDPrincipal(OpenIdPrincipal openIDPrincipal)
{
UserRegistration user = new UserRegistration();
Map<String,List<String>> attributes = openIDPrincipal.getAttributes();
user.setIdentifier(openIDPrincipal.getIdentifier());
-
+
if(attributes != null)
{
List<String> values = attributes.get("ax_firstName");
@@ -114,7 +114,7 @@
}
return user;
}
-
+
private UserRegistration processFacebookPrincipal(FacebookPrincipal facebookPrincipal)
{
UserRegistration user = new UserRegistration();
13 years, 3 months
Picketlink SVN: r1256 - in social/trunk/social/src/main/java/org/picketlink/social: reg and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-09-24 00:27:47 -0400 (Sat, 24 Sep 2011)
New Revision: 1256
Added:
social/trunk/social/src/main/java/org/picketlink/social/reg/
social/trunk/social/src/main/java/org/picketlink/social/reg/RegistrationValve.java
social/trunk/social/src/main/java/org/picketlink/social/reg/UserRegistration.java
Log:
user registration
Added: social/trunk/social/src/main/java/org/picketlink/social/reg/RegistrationValve.java
===================================================================
--- social/trunk/social/src/main/java/org/picketlink/social/reg/RegistrationValve.java (rev 0)
+++ social/trunk/social/src/main/java/org/picketlink/social/reg/RegistrationValve.java 2011-09-24 04:27:47 UTC (rev 1256)
@@ -0,0 +1,127 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.social.reg;
+
+import java.io.IOException;
+import java.security.Principal;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.catalina.connector.Request;
+import org.apache.catalina.connector.Response;
+import org.apache.catalina.valves.ValveBase;
+import org.picketlink.social.facebook.FacebookPrincipal;
+import org.picketlink.social.openid.OpenIdPrincipal;
+
+/**
+ * A Valve that can be added after the authenticator to look
+ * into the authenticated principal and derive useful information
+ * to register the user
+ *
+ * @author Anil Saldhana
+ * @since Sep 22, 2011
+ */
+public class RegistrationValve extends ValveBase
+{
+ public void invoke(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
+ {
+ if(request instanceof Request == false)
+ throw new IOException("Not of type Catalina request");
+ if(response instanceof Response == false)
+ throw new IOException("Not of type Catalina response");
+ invoke((Request)request, (Response)response);
+ }
+
+ public void invoke(Request request, Response response) throws IOException, ServletException
+ {
+ HttpSession session = request.getSession();
+ Principal principal = (Principal) session.getAttribute("PRINCIPAL");
+ if(principal == null)
+ throw new ServletException("User is not authenticated using the social authenticator");
+ UserRegistration user = null;
+ if(principal instanceof OpenIdPrincipal)
+ {
+ user = processOpenIDPrincipal((OpenIdPrincipal) principal);
+ }
+ else if(principal instanceof FacebookPrincipal)
+ {
+ user = processFacebookPrincipal((FacebookPrincipal) principal);
+ }
+ else
+ throw new ServletException("Unknown principal type:" + principal);
+ if(user != null)
+ {
+ session.setAttribute("user", user);
+ }
+
+ getNext().invoke(request, response);
+ }
+
+ private UserRegistration processOpenIDPrincipal(OpenIdPrincipal openIDPrincipal)
+ {
+ UserRegistration user = new UserRegistration();
+ Map<String,List<String>> attributes = openIDPrincipal.getAttributes();
+ user.setIdentifier(openIDPrincipal.getIdentifier());
+
+ if(attributes != null)
+ {
+ List<String> values = attributes.get("ax_firstName");
+ if(values != null && values.size() > 0)
+ user.setFirstName(values.get(0));
+
+ //Try the last name
+ values = attributes.get("ax_lastName");
+ if(values != null && values.size() > 0)
+ user.setLastName(values.get(0));
+
+ //Try the full name
+ values = attributes.get("ax_fullName");
+ if(values != null && values.size() > 0)
+ user.setFullName(values.get(0));
+
+ values = attributes.get("fullname"); //Yahoo
+ if(values != null && values.size() > 0)
+ user.setFullName(values.get(0));
+
+ //Email
+ values = attributes.get("ax_email");
+ if(values != null && values.size() > 0)
+ user.setEmail(values.get(0));
+ }
+ return user;
+ }
+
+ private UserRegistration processFacebookPrincipal(FacebookPrincipal facebookPrincipal)
+ {
+ UserRegistration user = new UserRegistration();
+ user.setEmail(facebookPrincipal.getEmail());
+ user.setFirstName(facebookPrincipal.getFirstName());
+ user.setLastName(facebookPrincipal.getLastName());
+ user.setIdentifier(facebookPrincipal.getId());
+ return user;
+ }
+}
\ No newline at end of file
Added: social/trunk/social/src/main/java/org/picketlink/social/reg/UserRegistration.java
===================================================================
--- social/trunk/social/src/main/java/org/picketlink/social/reg/UserRegistration.java (rev 0)
+++ social/trunk/social/src/main/java/org/picketlink/social/reg/UserRegistration.java 2011-09-24 04:27:47 UTC (rev 1256)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.social.reg;
+
+/**
+ * Represents a user with details from 3rd party provider
+ * @author Anil Saldhana
+ * @since Sep 22, 2011
+ */
+public class UserRegistration
+{
+ private String identifier;
+
+ private String firstName;
+
+ private String lastName;
+
+ private String fullName;
+
+ private String email;
+
+ public String getIdentifier()
+ {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier)
+ {
+ this.identifier = identifier;
+ }
+
+ public String getFirstName()
+ {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName)
+ {
+ this.firstName = firstName;
+ }
+
+ public String getLastName()
+ {
+ return lastName;
+ }
+
+ public void setLastName(String lastName)
+ {
+ this.lastName = lastName;
+ }
+
+ public String getFullName()
+ {
+ return fullName;
+ }
+
+ public void setFullName(String fullName)
+ {
+ this.fullName = fullName;
+ }
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail(String email)
+ {
+ this.email = email;
+ }
+}
\ No newline at end of file
13 years, 3 months
Picketlink SVN: r1255 - social/trunk/facebook/src/main/java/org/picketlink/social/facebook.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-09-24 00:27:31 -0400 (Sat, 24 Sep 2011)
New Revision: 1255
Modified:
social/trunk/facebook/src/main/java/org/picketlink/social/facebook/FacebookProcessor.java
Log:
correct attrib name
Modified: social/trunk/facebook/src/main/java/org/picketlink/social/facebook/FacebookProcessor.java
===================================================================
--- social/trunk/facebook/src/main/java/org/picketlink/social/facebook/FacebookProcessor.java 2011-09-24 04:27:08 UTC (rev 1254)
+++ social/trunk/facebook/src/main/java/org/picketlink/social/facebook/FacebookProcessor.java 2011-09-24 04:27:31 UTC (rev 1255)
@@ -157,7 +157,7 @@
Principal principal = null;
Principal facebookPrincipal = handleAuthenticationResponse(request, response);
- request.getSession().setAttribute("principal", facebookPrincipal);
+ request.getSession().setAttribute("PRINCIPAL", facebookPrincipal);
cachedPrincipal.set(facebookPrincipal);
if(isJBossEnv())
13 years, 3 months
Picketlink SVN: r1254 - social/trunk/openid/src/main/java/org/picketlink/social/openid/auth.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-09-24 00:27:08 -0400 (Sat, 24 Sep 2011)
New Revision: 1254
Modified:
social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/OpenIDConsumerAuthenticator.java
Log:
addtl attrib
Modified: social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/OpenIDConsumerAuthenticator.java
===================================================================
--- social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/OpenIDConsumerAuthenticator.java 2011-09-24 04:26:42 UTC (rev 1253)
+++ social/trunk/openid/src/main/java/org/picketlink/social/openid/auth/OpenIDConsumerAuthenticator.java 2011-09-24 04:27:08 UTC (rev 1254)
@@ -58,7 +58,7 @@
private String returnURL = null;
- private String requiredAttributes = "name,email,ax_firstName,ax_lastName,ax_fullName";
+ private String requiredAttributes = "name,email,ax_firstName,ax_lastName,ax_fullName,ax_email";
private String optionalAttributes = null;
13 years, 3 months