[seam-commits] Seam SVN: r14469 - in branches/community/Seam_2_3/examples-ee6: openid and 35 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Apr 2 11:01:33 EDT 2012
Author: maschmid
Date: 2012-04-02 11:01:30 -0400 (Mon, 02 Apr 2012)
New Revision: 14469
Added:
branches/community/Seam_2_3/examples-ee6/openid/
branches/community/Seam_2_3/examples-ee6/openid/openid-ear/
branches/community/Seam_2_3/examples-ee6/openid/openid-ear/pom.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/
branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/main/
branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/main/application/
branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/main/application/META-INF/
branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/main/application/META-INF/jboss-deployment-structure.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/main/application/META-INF/jboss-seam-openid-ds.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/pom.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/seam/
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/seam/example/
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/seam/example/openid/
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/seam/example/openid/Auth.java
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/seam/example/openid/Post.java
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/META-INF/
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/META-INF/ejb-jar.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/META-INF/persistence.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/import.sql
branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/seam.properties
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/org/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/org/jboss/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/org/jboss/seam/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/org/jboss/seam/example/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/org/jboss/seam/example/openid/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/org/jboss/seam/example/openid/test/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/org/jboss/seam/example/openid/test/selenium/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/org/jboss/seam/example/openid/test/selenium/SeleniumOpenIdTest.java
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources-ftest/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources-ftest/testng.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources/WEB-INF/
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources/WEB-INF/components.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources/seam.properties
branches/community/Seam_2_3/examples-ee6/openid/openid-web/
branches/community/Seam_2_3/examples-ee6/openid/openid-web/pom.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/
branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/
branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/
branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/
branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/components.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/faces-config.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/pages.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/web.xml
branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/login-bg.gif
branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/main.xhtml
branches/community/Seam_2_3/examples-ee6/openid/pom.xml
branches/community/Seam_2_3/examples-ee6/openid/readme.txt
Log:
add openid to the ee6 examples
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-ear/pom.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-ear/pom.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>openid</artifactId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-ear</artifactId>
+ <packaging>ear</packaging>
+ <name>Openid EAR Module (EE6)</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-web</artifactId>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-ejb</artifactId>
+ <type>ejb</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <type>ejb</type>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xpp3</groupId>
+ <artifactId>xpp3_min</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.openid4java</groupId>
+ <artifactId>openid4java-consumer</artifactId>
+ <type>pom</type>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>seam-openid</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-ear-plugin</artifactId>
+ <configuration>
+ <version>6</version>
+ <defaultLibBundleDir>lib</defaultLibBundleDir>
+ <!-- Exclude eclipse generated application.xml and manually modified jboss-app.xml during mvn build -->
+ <earSourceExcludes>**/application.xml, **/jboss-app.xml</earSourceExcludes>
+ <!-- use maven generated application.xml instead -->
+ <generateApplicationXml>true</generateApplicationXml>
+ <modules>
+ <webModule>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-web</artifactId>
+ <contextRoot>/seam-openid</contextRoot>
+ <bundleFileName>openid-web.war</bundleFileName>
+ </webModule>
+ <ejbModule>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-ejb</artifactId>
+ <bundleFileName>openid-ejb.jar</bundleFileName>
+ </ejbModule>
+ <ejbModule>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <bundleFileName>jboss-seam.jar</bundleFileName>
+ </ejbModule>
+ </modules>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>exploded</id>
+ <properties>
+ <example.name>openid</example.name>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>package</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-ear</artifactId>
+ <type>ear</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-web</artifactId>
+ <type>war</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear/${example.name}-web.war</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-ejb</artifactId>
+ <type>jar</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear/${example.name}-ejb.jar</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/main/application/META-INF/jboss-deployment-structure.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/main/application/META-INF/jboss-deployment-structure.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/main/application/META-INF/jboss-deployment-structure.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,9 @@
+<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
+ <deployment>
+ <dependencies>
+ <module name="org.dom4j" export="true"/>
+ <module name="org.apache.commons.collections" export="true"/>
+ <module name="javax.faces.api" export="true"/>
+ </dependencies>
+ </deployment>
+</jboss-deployment-structure>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/main/application/META-INF/jboss-seam-openid-ds.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/main/application/META-INF/jboss-seam-openid-ds.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-ear/src/main/application/META-INF/jboss-seam-openid-ds.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources xmlns="http://www.jboss.org/ironjacamar/schema">
+ <datasource
+ jndi-name="java:/openidDatasource"
+ enabled="true"
+ use-java-context="true" pool-name="openiddb">
+ <connection-url>jdbc:h2:mem:openiddb;DB_CLOSE_DELAY=-1</connection-url>
+ <driver>h2</driver>
+ <security>
+ <user-name>sa</user-name>
+ <password>sa</password>
+ </security>
+ </datasource>
+</datasources>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/pom.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/pom.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>openid</artifactId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-ejb</artifactId>
+ <packaging>ejb</packaging>
+ <name>Openid EJB Module (EE6)</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <type>ejb</type>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/seam/example/openid/Auth.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/seam/example/openid/Auth.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/seam/example/openid/Auth.java 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,23 @@
+package org.jboss.seam.example.openid;
+
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.security.openid.*;
+
+ at Name("authenticator")
+public class Auth
+{
+ @In(create=false) OpenId openid;
+
+ public boolean authenticate()
+ {
+ System.out.println("AUTH: " + openid + "-" + openid.getValidatedId());
+
+ return true;
+ }
+
+
+ public boolean authenticateOpenID() {
+ return true;
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/seam/example/openid/Post.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/seam/example/openid/Post.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/java/org/jboss/seam/example/openid/Post.java 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,56 @@
+package org.jboss.seam.example.openid;
+
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+
+
+ at Entity
+ at Table(name="post")
+public class Post {
+ long id;
+ String creator;
+ String message;
+ Date createDate;
+
+ @Id
+ @GeneratedValue
+ @Column(name="id")
+ public long getId() {
+ return id;
+ }
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ @Column(name="creator")
+ public String getCreator() {
+ return creator;
+ }
+ public void setCreator(String creator) {
+ this.creator = creator;
+ }
+
+ @Column(name="message")
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+
+ @Column(name="createDate")
+ public Date getCreateDate() {
+ return createDate;
+ }
+ public void setCreateDate(Date createDate) {
+ this.createDate = createDate;
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/META-INF/ejb-jar.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/META-INF/ejb-jar.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/META-INF/ejb-jar.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar 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 http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+ version="3.0">
+
+ <interceptors>
+ <interceptor>
+ <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor>
+ </interceptors>
+
+ <assembly-descriptor>
+ <interceptor-binding>
+ <ejb-name>*</ejb-name>
+ <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+ </assembly-descriptor>
+
+</ejb-jar>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/META-INF/persistence.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/META-INF/persistence.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+ <persistence-unit name="openidDatabase">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>java:/openidDatasource</jta-data-source>
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+ <property name="hibernate.show_sql" value="true"/>
+ <property name="jboss.entity.manager.factory.jndi.name"
+ value="java:/openidEntityManagerFactory"/>
+ </properties>
+ </persistence-unit>
+</persistence>
+
+
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/import.sql
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/import.sql (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/import.sql 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,2 @@
+insert into post (id,creator,message,createDate) values (-1,'http://maximoburrito.myopenid.com/','First Post!',now());
+insert into post (id,creator,message,createDate) values (-2,'http://maximoburrito.myopenid.com/','Have fun with Seam!',now());
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-ejb/src/main/resources/seam.properties
===================================================================
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-tests/pom.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-tests/pom.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>openid</artifactId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-tests</artifactId>
+ <name>Openid Integration Tests Module (EE6)</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-ejb</artifactId>
+ <type>ejb</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <type>ejb</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.seleniumhq.selenium.server</groupId>
+ <artifactId>selenium-server</artifactId>
+ <classifier>standalone</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.seleniumhq.selenium.client-drivers</groupId>
+ <artifactId>selenium-java-client-driver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>functional-tests</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>ftest</id>
+ <properties>
+ <example.context.path>seam-openid</example.context.path>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>failsafe-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/org/jboss/seam/example/openid/test/selenium/SeleniumOpenIdTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/org/jboss/seam/example/openid/test/selenium/SeleniumOpenIdTest.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/java/org/jboss/seam/example/openid/test/selenium/SeleniumOpenIdTest.java 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,132 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * 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.seam.example.openid.test.selenium;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+/**
+ * This class tests basic functionality of Seam OpenId example.
+ *
+ * For executing this test a selenium.browser property is automaticly changed:
+ *
+ * selenium.browser=*chrome (to test Mozilla Firefox)
+ * selenium.browser=*iehta (to test Internet Explorer)
+ *
+ * This parameter tells browser to increase its privileges to be able to
+ * work across multiple domains.
+ *
+ *
+ * @author Martin Gencur
+ *
+ */
+public class SeleniumOpenIdTest extends SeamSeleniumTest
+{
+ public static final String HOME_PAGE_TITLE = "OpenID Wall";
+ public static final String LOGIN_LINK = "xpath=//input[@value='OpenID Login']";
+ public static final String LOGIN_INPUT = "xpath=//input[@class='openid_input']";
+ public static final String PASSWORD_INPUT = "id=password";
+ public static final String SIGNIN_BUTTON = "id=signin_button";
+ public static final String CONTINUE_BUTTON = "xpath=//button[contains(text(),'Continue')]";
+ public static final String LOGOUT_BUTTON = "xpath=//input[@value='Logout']";
+
+ public static String OPENID_ACCOUNT;
+ public static String OPENID_PASSWORD;
+
+ public static String ORIGINAL_BROWSER;
+
+ @BeforeClass
+ @Parameters( { "openid.account", "openid.password" })
+ public void setCredentials(String account, String password) {
+ OPENID_ACCOUNT = account;
+ OPENID_PASSWORD = password;
+ }
+
+ @AfterClass
+ public void returnBrowser(){
+ super.setBrowser(ORIGINAL_BROWSER);
+ }
+
+ @BeforeMethod
+ @Override
+ public void setUp()
+ {
+ /*setting browser with enhanced security privileges for selenium*/
+ setProperBrowser(SeamSeleniumTest.getBrowser());
+ super.setUp();
+ browser.open(CONTEXT_PATH);
+ }
+
+ /**
+ * Place holder - just verifies that example deploys
+ */
+ @Test
+ public void homePageLoadTest()
+ {
+ assertEquals("Unexpected page title.", HOME_PAGE_TITLE, browser.getTitle());
+ }
+
+ /**
+ * Method verifies login and logout operations.
+ */
+ @Test(dependsOnMethods={"homePageLoadTest"})
+ public void openIdLoginLogoutTest(){
+ deleteCookies();
+ browser.type(LOGIN_INPUT, OPENID_ACCOUNT);
+ browser.clickAndWait(LOGIN_LINK);
+ browser.type(PASSWORD_INPUT, OPENID_PASSWORD);
+ browser.clickAndWait(SIGNIN_BUTTON);
+ if (browser.isElementPresent(CONTINUE_BUTTON)) {
+ browser.clickAndWait(CONTINUE_BUTTON);
+ }
+ assertTrue("Page should contain information about successfull login", browser.isTextPresent("OpenID login successful..."));
+ browser.clickAndWait(LOGOUT_BUTTON);
+ assertTrue("Page should contain input field which means that user is not logged in anymore", browser.isElementPresent(LOGIN_INPUT));
+ }
+
+ private void deleteCookies(){
+ browser.deleteCookie("session_id","");
+ browser.deleteCookie("secure_session_id","");
+ }
+
+ /**
+ * Method for setting proper browser for selenium so that it can work
+ * across multiple domains.
+ *
+ * @param origBrowser Originally intended browser
+ */
+ private void setProperBrowser(String origBrowser){
+ ORIGINAL_BROWSER = origBrowser;
+ if (origBrowser.equals("*firefox") || origBrowser.equals("*firefoxproxy")) {
+ super.setBrowser("*chrome");
+ }
+ if (origBrowser.equals("*iexplore") || origBrowser.equals("*iexploreproxy")) {
+ super.setBrowser("*iehta");
+ }
+ }
+}
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources/WEB-INF/components.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources/WEB-INF/components.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation=
+ "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.3.xsd
+ http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd">
+
+ <core:init jndi-pattern="#{ejbName}/local"/>
+
+</components>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources/seam.properties
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources/seam.properties (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources/seam.properties 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,3 @@
+#debug is explicitly disabled in test to avoid JBIDE-3623
+#Thu Dec 31 16:24:37 CET 2009
+org.jboss.seam.core.init.debug=false
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources-ftest/testng.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources-ftest/testng.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources-ftest/testng.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,26 @@
+
+ <!--
+ JBoss, Home of Professional Open Source Copyright 2008, Red Hat
+ Middleware LLC, and individual contributors 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.
+ -->
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="OpenId example" verbose="2" parallel="false">
+ <test name="openid_tests">
+ <parameter name="PROPERTY_FILE" value="" />
+ <classes>
+ <class name="org.jboss.seam.example.openid.test.selenium.SeleniumOpenIdTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: branches/community/Seam_2_3/examples-ee6/openid/openid-tests/src/test/resources-ftest/testng.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-web/pom.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-web/pom.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>openid</artifactId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-web</artifactId>
+ <packaging>war</packaging>
+ <name>Openid Web Module (EE6)</name>
+
+ <properties>
+ <!-- filtering property for components.xml -->
+ <jndiPattern>java:app/openid-ejb/#{ejbName}</jndiPattern>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-ejb</artifactId>
+ <type>ejb</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <type>ejb</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-ui</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-jul</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-debug</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>src/main/webapp</directory>
+ <filtering>true</filtering>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>tomcat</id>
+ <properties>
+ <!-- filtering property for components.xml -->
+ <jndiPattern>#{ejbName}/local</jndiPattern>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-ejb</artifactId>
+ <type>ejb</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <type>ejb</type>
+ <exclusions>
+ <exclusion>
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xpp3</groupId>
+ <artifactId>xpp3_min</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <build>
+ <finalName>jboss-seam-openid</finalName>
+ </build>
+ </profile>
+ </profiles>
+</project>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/components.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/components.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:persistence="http://jboss.com/products/seam/persistence"
+ xmlns:security="http://jboss.com/products/seam/security"
+ xmlns:framework="http://jboss.com/products/seam/framework"
+ xmlns:transaction="http://jboss.com/products/seam/transaction"
+ xmlns:web="http://jboss.com/products/seam/web"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.3.xsd
+ http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.3.xsd
+ http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.3.xsd
+ http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.3.xsd
+ http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.3.xsd
+ http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.3.xsd
+ http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd">
+
+ <core:init jndi-pattern="@jndiPattern@" debug="true" />
+
+ <core:manager conversation-timeout="1200000"
+ concurrent-request-timeout="50000" conversation-id-parameter="cid" />
+
+ <web:rewrite-filter />
+
+ <transaction:ejb-transaction />
+
+ <security:identity authenticate-method="#{authenticator.authenticate}" />
+
+ <persistence:managed-persistence-context
+ name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/openidEntityManagerFactory" />
+
+ <component name="newpost" class="org.jboss.seam.example.openid.Post">
+ <property name="createDate">#{currentDate}</property>
+ <property name="creator">#{openid.validatedId}</property>
+ </component>
+
+ <framework:entity-query name="posts">
+ <framework:ejbql>select p from Post p</framework:ejbql>
+ </framework:entity-query>
+
+ <framework:entity-home name="postHome"
+ entity-class="org.jboss.seam.example.openid.Post" new-instance="#{newpost}" />
+
+
+ <event type="org.jboss.seam.security.loggedOut">
+ <action execute="#{openid.logout}" />
+ </event>
+ <!-- not used here -->
+ <event type="org.jboss.seam.openid.ok">
+ <action execute="#{openid.loginImmediately}" />
+ <!-- <action execute="#{redirect.returnToCapturedView}" /> -->
+ </event>
+
+ <component class="org.jboss.seam.transaction.EjbSynchronizations" jndi-name="java:app/jboss-seam/EjbSynchronizations"/>
+
+</components>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/faces-config.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<faces-config version="2.1"
+ 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 http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd">
+
+ <lifecycle>
+ <phase-listener>org.jboss.seam.security.openid.OpenIdPhaseListener</phase-listener>
+ </lifecycle>
+</faces-config>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/pages.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/pages.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pages xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.3.xsd"
+ no-conversation-view-id="/main.xhtml" login-view-id="/home.xhtml">
+
+ <page view-id="/openid.xhtml">
+ <navigation evaluate="#{openid.loginImmediately()}">
+ <rule if-outcome="true">
+ <redirect view-id="/main.xhtml">
+ <message>OpenID login successful...</message>
+ </redirect>
+ </rule>
+ <rule if-outcome="false">
+ <redirect view-id="/main.xhtml">
+ <message>OpenID login rejected...</message>
+ </redirect>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/main.xhtml">
+ <rewrite pattern="/" />
+
+ <navigation from-action="#{postHome.persist}" evaluate="#{postHome.clearInstance()}">
+ <redirect view-id="/main.xhtml" />
+ </navigation>
+ </page>
+
+
+ <exception class="javax.faces.application.ViewExpiredException">
+ <redirect view-id="/main.xhtml">
+ <message severity="warn">Your session expired. Please try again.</message>
+ </redirect>
+ </exception>
+
+</pages>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/WEB-INF/web.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="3.0"
+ 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 http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+ <display-name>Seam openid Example</display-name>
+
+ <!-- Seam -->
+
+ <listener>
+ <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
+
+ <filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+
+ <context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>emeraldTown</param-value>
+ </context-param>
+
+ <!-- JSF -->
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+</web-app>
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/login-bg.gif
===================================================================
(Binary files differ)
Property changes on: branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/login-bg.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/main.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/main.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/openid-web/src/main/webapp/main.xhtml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,91 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:rich="http://richfaces.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib" xmlns:a="http://richfaces.org/a4j">
+
+<html>
+ <h:head>
+ <title>OpenID Wall</title>
+ <style type="text/css">
+.openid_input {
+ background: #fff url("login-bg.gif") no-repeat;
+ border: 1px solid #666;
+ width: 232px;
+ padding-left: 18px;
+}
+ </style>
+
+ </h:head>
+ <h:body>
+
+ <div id="top">
+ <rich:toolbar height="34" itemSeparator="line">
+ <rich:toolbarGroup>
+ <h:outputLabel value="OpenId Wall Demo" />
+ </rich:toolbarGroup>
+
+ <rich:toolbarGroup location="right">
+ <s:div rendered="#{!identity.loggedIn}">
+ <h:form>
+ <h:inputText value="#{openid.id}" styleClass="openid_input"/>
+ <h:commandButton action="#{openid.login}" value="OpenID Login"/>
+ </h:form>
+ </s:div>
+ <s:div rendered="#{identity.loggedIn}">
+ <h:form>
+ <h:outputLabel value="#{openid.validatedId}" />
+ <h:commandButton action="#{identity.logout}" value="Logout"/>
+ </h:form>
+ </s:div>
+ </rich:toolbarGroup>
+ </rich:toolbar>
+ </div>
+
+ <rich:panel>
+ <f:facet name="header">About the Demo</f:facet>
+
+ <rich:messages />
+
+ <s:div rendered="#{!identity.loggedIn}">
+ This application demonstrates the basic use of OpenID in an application. To login, simply enter
+ your OpenId into the login box at the top. Don't have an OpenId? Actually, you might have one
+ and not know it. If you have a <a href="http://openid.yahoo.com/">Yahoo</a> account, a
+ <a href="http://www.livejournal.com/openid/">liveournal</a> account, a blog at
+ <a href="http://blogger.com">blogger.com</a>, to name a few you might already have an
+ OpenID available to you. If not, you can establish an independent OpenID at
+ a free service like <a href="https://www.myopenid.com/">myOpenID</a>.
+ </s:div>
+
+ <s:div rendered="#{identity.loggedIn}">
+ Congratulations, you have logged into the Wall with an OpenID of <b>#{openid.validatedId}</b>.
+ </s:div>
+ </rich:panel>
+
+
+
+ <rich:panel rendered="#{identity.loggedIn}">
+ <f:facet name="header">New Post</f:facet>
+
+ <h:form>
+ <h:inputText value="#{postHome.instance.message}" required="true" />
+ <h:commandButton value="Post" action="#{postHome.persist}" />
+ </h:form>
+ </rich:panel>
+
+
+ <rich:panel>
+ <f:facet name="header">Wall Posts</f:facet>
+ <ui:repeat value="#{posts.resultList}" var="post">
+ <rich:panel>
+ #{post.message}
+ <br />
+ <b>#{post.creator}</b> --
+ <h:outputText value="#{post.createDate}">
+ <s:convertDateTime dateStyle="full" type="both" />
+ </h:outputText>
+ </rich:panel>
+ </ui:repeat>
+ </rich:panel>
+ </h:body>
+</html>
+</ui:composition>
Added: branches/community/Seam_2_3/examples-ee6/openid/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/pom.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/pom.xml 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ <artifactId>examples-ee6</artifactId>
+ <groupId>org.jboss.seam</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <artifactId>openid</artifactId>
+ <packaging>pom</packaging>
+ <name>OpenID Example (EE6)</name>
+
+ <modules>
+ <module>openid-ejb</module>
+ <module>openid-web</module>
+ <module>openid-ear</module>
+ <module>openid-tests</module>
+ </modules>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-ejb</artifactId>
+ <version>${project.version}</version>
+ <type>ejb</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-web</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.openid</groupId>
+ <artifactId>openid-ear</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
Added: branches/community/Seam_2_3/examples-ee6/openid/readme.txt
===================================================================
--- branches/community/Seam_2_3/examples-ee6/openid/readme.txt (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/openid/readme.txt 2012-04-02 15:01:30 UTC (rev 14469)
@@ -0,0 +1,29 @@
+Seam OpenId Example
+===================
+
+This is a trivial example of presentation how OpenId authentication is integrated with Seam security.
+It runs on both JBoss AS as an EAR and Tomcat with Embedded JBoss as a WAR.
+
+To deploy the example to JBossAS 4, JBossAS 5 or JBossAS 6, follow these steps:
+
+* In the example root directory run:
+
+ mvn clean package
+
+* Set JBOSS_HOME environment property.
+
+* In the openid-ear directory run:
+
+ mvn jboss:hard-deploy
+
+* Open this URL in a web browser: http://localhost:8080/seam-openid
+
+To deploy the example to Tomcat with Embedded JBoss, follow these steps:
+
+* In the example root directory run:
+
+ mvn clean package -Ptomcat
+
+* Deploy the resulting war from openid-web/target directory to Tomcat manually.
+
+* Open this URL in a web browser: http://localhost:8080/jboss-seam-openid
More information about the seam-commits
mailing list