[jboss-cvs] Picketlink SVN: r1253 - in social/trunk/webapps/picketlink-reg: resources and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Sep 24 00:26:42 EDT 2011


Author: anil.saldhana at jboss.com
Date: 2011-09-24 00:26:42 -0400 (Sat, 24 Sep 2011)
New Revision: 1253

Added:
   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/WEB-INF/context.xml
   social/trunk/webapps/picketlink-reg/resources/WEB-INF/jboss-web.xml
   social/trunk/webapps/picketlink-reg/resources/WEB-INF/web.xml
   social/trunk/webapps/picketlink-reg/resources/index.jsp
Log:
social regist

Added: social/trunk/webapps/picketlink-reg/resources/WEB-INF/context.xml
===================================================================
--- social/trunk/webapps/picketlink-reg/resources/WEB-INF/context.xml	                        (rev 0)
+++ social/trunk/webapps/picketlink-reg/resources/WEB-INF/context.xml	2011-09-24 04:26:42 UTC (rev 1253)
@@ -0,0 +1,9 @@
+<Context>
+    <Valve className="org.picketlink.social.auth.ExternalAuthenticator" 
+           returnURL="http://localhost:8080/picketlink-reg/"
+           scope="email"
+           clientID="YOUR_CLIENT_ID"
+           clientSecret="YOUR_CLIENT_SECRET"
+           roleString="user"/>
+    <Valve className="org.picketlink.social.reg.RegistrationValve"/>
+</Context>

Added: social/trunk/webapps/picketlink-reg/resources/WEB-INF/jboss-web.xml
===================================================================
--- social/trunk/webapps/picketlink-reg/resources/WEB-INF/jboss-web.xml	                        (rev 0)
+++ social/trunk/webapps/picketlink-reg/resources/WEB-INF/jboss-web.xml	2011-09-24 04:26:42 UTC (rev 1253)
@@ -0,0 +1,3 @@
+<jboss-web>
+    <security-domain>external_auth</security-domain>
+</jboss-web>

Added: social/trunk/webapps/picketlink-reg/resources/WEB-INF/web.xml
===================================================================
--- social/trunk/webapps/picketlink-reg/resources/WEB-INF/web.xml	                        (rev 0)
+++ social/trunk/webapps/picketlink-reg/resources/WEB-INF/web.xml	2011-09-24 04:26:42 UTC (rev 1253)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app 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_2_5.xsd"
+   version="2.5"> 
+
+  <display-name>PicketLink Social Registration Application</display-name>
+  <description>
+    Registration Web Application for the PicketLink Social Project
+  </description>
+
+  <!-- Define a security constraint that gives unlimted access to images -->
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>Images</web-resource-name>
+      <url-pattern>/images/*</url-pattern>
+    </web-resource-collection>
+  </security-constraint>
+
+  <!-- Define a Security Constraint on this Application -->
+  <security-constraint>
+    <web-resource-collection>
+      <web-resource-name>Manager command</web-resource-name>
+      <url-pattern>/*</url-pattern>
+    </web-resource-collection>
+    <auth-constraint>
+       <role-name>user</role-name>
+    </auth-constraint>
+  </security-constraint>
+
+  <!-- Define the Login Configuration for this Application -->
+  <login-config>
+    <auth-method>FORM</auth-method>
+    <realm-name>PicketLink IDP Application</realm-name>
+    <form-login-config>
+       <form-login-page>/jsp/login.jsp</form-login-page>
+       <form-error-page>/jsp/login-error.jsp</form-error-page>
+    </form-login-config>
+  </login-config>
+
+  <!-- Security roles referenced by this web application -->
+  <security-role>
+    <role-name>user</role-name>
+  </security-role>
+</web-app>

Added: social/trunk/webapps/picketlink-reg/resources/index.jsp
===================================================================
--- social/trunk/webapps/picketlink-reg/resources/index.jsp	                        (rev 0)
+++ social/trunk/webapps/picketlink-reg/resources/index.jsp	2011-09-24 04:26:42 UTC (rev 1253)
@@ -0,0 +1,27 @@
+<%@ page import="org.picketlink.social.reg.UserRegistration" %>
+
+<%
+  String fullName = request.getUserPrincipal().getName();
+  String email = null;
+  UserRegistration user = (UserRegistration)session.getAttribute("user");
+  if(user != null)
+  {
+    fullName = user.getFirstName() + " " + user.getLastName();
+    email = user.getEmail();
+  }
+%>
+   
+<html>
+<body>
+
+<div align="center">
+<h1>PicketLink Social Registration</h1>
+<br/>
+Welcome <%=fullName%>
+
+<br/>
+Your email address is:<%=email%>
+
+<br/>
+
+</div>



More information about the jboss-cvs-commits mailing list