Author: sohil.shah(a)jboss.com
Date: 2009-11-15 23:18:58 -0500 (Sun, 15 Nov 2009)
New Revision: 13831
Added:
jbossexo/modules/sso/trunk/agent/
jbossexo/modules/sso/trunk/agent/pom.xml
jbossexo/modules/sso/trunk/agent/src/
jbossexo/modules/sso/trunk/agent/src/main/
jbossexo/modules/sso/trunk/agent/src/main/config/
jbossexo/modules/sso/trunk/agent/src/main/config/cas/
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp
jbossexo/modules/sso/trunk/agent/src/main/config/josso/
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp
jbossexo/modules/sso/trunk/agent/src/main/java/
Modified:
jbossexo/modules/sso/trunk/.classpath
jbossexo/modules/sso/trunk/pom.xml
Log:
GateIn SSO Agent
Modified: jbossexo/modules/sso/trunk/.classpath
===================================================================
--- jbossexo/modules/sso/trunk/.classpath 2009-11-15 20:51:26 UTC (rev 13830)
+++ jbossexo/modules/sso/trunk/.classpath 2009-11-16 04:18:58 UTC (rev 13831)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="src" path="agent/src/main/java"/>
<classpathentry kind="src"
path="auth-callback/src/main/java"/>
<classpathentry kind="src"
path="auth-callback/src/test/java"/>
<classpathentry kind="src"
path="gatein-cas-plugin/src/main/java"/>
Added: jbossexo/modules/sso/trunk/agent/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/agent/pom.xml (rev 0)
+++ jbossexo/modules/sso/trunk/agent/pom.xml 2009-11-16 04:18:58 UTC (rev 13831)
@@ -0,0 +1,139 @@
+<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.gatein.sso</groupId>
+ <artifactId>gatein-sso-parent</artifactId>
+ <relativePath>../pom.xml</relativePath>
+ <version>trunk-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>agent</artifactId>
+ <packaging>jar</packaging>
+ <name>Gatein SSO Agent</name>
+
+ <properties>
+ <!-- ChangeMe to your specific local environment -->
+
<gatein.location>/home/soshah/projects/gatein/runtime/jboss/server/default</gatein.location>
+ <version.gatein>3.0.0-CR01-SNAPSHOT</version.gatein>
+ </properties>
+
+ <dependencies>
+ </dependencies>
+
+
+ <!-- profile for packaging and deploying this plugin into a cas server -->
+ <profiles>
+ <profile>
+ <id>cas-agent</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
+ <artifactId>maven-antrun-extended-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>cas-agent-package</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <echo message="Preparing the CAS Agent for GateIn"/>
+
+ <!-- setup the directory for cas agent artifact -->
+ <delete dir="${basedir}/target/cas"/>
+ <mkdir dir="${basedir}/target/cas"/>
+
+ <unjar
src="${settings.localRepository}/org/exoplatform/portal/exo.portal.web.portal/${version.gatein}/exo.portal.web.portal-${version.gatein}.war"
+ dest="${basedir}/target/cas/portal.war"
overwrite="true"/>
+
+ <!-- override the core artifacts -->
+ <copy todir="${basedir}/target/cas/portal.war">
+ <fileset
dir="${basedir}/src/main/config/cas/portal.war"/>
+ </copy>
+
+ <!-- jar it back up -->
+ <jar destfile="${basedir}/target/cas/02portal.war"
basedir="${basedir}/target/cas/portal.war"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>cas-agent-install</id>
+ <phase>install</phase>
+ <configuration>
+ <tasks>
+ <echo message="Deploying the CAS Agent for GateIn"/>
+ <copy file="${basedir}/target/cas/02portal.war"
+ todir="${gatein.location}/deploy/gatein.ear"
+ overwrite="true"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>josso-agent</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
+ <artifactId>maven-antrun-extended-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>josso-agent-package</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <echo message="Preparing the JOSSO Agent for GateIn"/>
+
+ <!-- setup the directory for josso agent artifact -->
+ <delete dir="${basedir}/target/josso"/>
+ <mkdir dir="${basedir}/target/josso"/>
+
+ <unjar
src="${settings.localRepository}/org/exoplatform/portal/exo.portal.web.portal/${version.gatein}/exo.portal.web.portal-${version.gatein}.war"
+ dest="${basedir}/target/josso/portal.war"
overwrite="true"/>
+
+ <!-- override the core artifacts -->
+ <copy todir="${basedir}/target/josso/portal.war">
+ <fileset
dir="${basedir}/src/main/config/josso/portal.war"/>
+ </copy>
+
+ <!-- jar it back up -->
+ <jar destfile="${basedir}/target/josso/02portal.war"
basedir="${basedir}/target/josso/portal.war"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>josso-agent-install</id>
+ <phase>install</phase>
+ <configuration>
+ <tasks>
+ <echo message="Deploying the JOSSO Agent for GateIn"/>
+ <copy file="${basedir}/target/josso/02portal.war"
+ todir="${gatein.location}/deploy/gatein.ear"
+ overwrite="true"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
+
Added:
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
---
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl
(rev 0)
+++
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-16
04:18:58 UTC (rev 13831)
@@ -0,0 +1,87 @@
+<%
+ import org.exoplatform.web.application.JavascriptManager;
+ import javax.servlet.http.HttpSession;
+ def rcontext = _ctx.getRequestContext();
+ JavascriptManager jsmanager = rcontext.getJavascriptManager();
+ jsmanager.importJavascript('eXo.portal.UIPortalControl');
+ jsmanager.addCustomizedOnLoadScript('document.getElementById("UIPortalComponentLogin").username.focus();');
+ HttpSession session = rcontext.getRequest().getSession();
+ String requestPath = rcontext.getRequestContextPath() + "/private/" +
rcontext.getPortalOwner();
+ session.setAttribute("initialURI", requestPath);
+%>
+<div class="UILoginForm">
+ <div class="LoginDecorator">
+ <div class="TopLeftLoginDecorator">
+ <div class="TopRightLoginDecorator">
+ <div class="TopCenterLoginDecorator">
+ <div
class="SigninTitle"><%=_ctx.appRes("UILoginForm.label.Signin")%></div>
+ </div>
+ </div>
+ </div>
+ <div class="MiddleLeftLoginDecorator">
+ <div class="MiddleRightLoginDecorator">
+ <div class="LoginDecoratorBackground">
+ <div class="LoginDetailBox">
+ <% uiform.begin(); %>
+ <!--<form class="UIForm" id="$uicomponent.id"
name="loginForm" action="<%= rcontext.getRequestContextPath() +
"/login"%>" method="post" style="margin: 0px;">
+ <input type="hidden" name="<%= uiform.ACTION %>"
value=""/>-->
+ <input type="hidden" name="uri"
value="<%=session.getAttribute("initialURI"); %>"/>
+ <div class="VerticalLayout">
+ <table class="UIFormGrid">
+ <tr class="UserNameField">
+ <td
class="FieldLabel"><%=_ctx.appRes("UILoginForm.label.UserName")%></td>
+ <td><% uiform.renderChild(0)%></td>
+ </tr>
+ <tr class="PasswordField" id="UIPortalLoginFormControl"
onkeypress="eXo.portal.UIPortalControl.onEnterPress(event)">
+ <td
class="FieldLabel"><%=_ctx.appRes("UILoginForm.label.password")%></td>
+ <td><% uiform.renderChild(1)%></td>
+ </tr>
+ <tr class="RememberField"
onkeypress="eXo.portal.UIPortalControl.onEnterPress(event)">
+ <td class="FieldLabel"><%
uiform.renderChild(2)%></td>
+ <td><%=_ctx.appRes("UILoginForm.label.RememberOnComputer")%></td>
+ </tr>
+ </table>
+ <div class="ForgetPass"><a href="<%=
uicomponent.event("ForgetPassword")
%>"><%=_ctx.appRes("UILoginForm.label.forgot")%></a></div>
+ <div class="UIAction">
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div onclick="login(this);"
id="UIPortalLoginFormAction" class="ActionButton SimpleStyle">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a
href="#"><%=_ctx.appRes("UILoginForm.label.Signin");%></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div onclick="<%=uicomponent.event("Close");%>"
class="ActionButton SimpleStyle">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a
href="javascript:void(0);"><%=_ctx.appRes("UILoginForm.label.Discard")%></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <%uiform.end()%>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="BottomLeftLoginDecorator">
+ <div class="BottomRightLoginDecorator">
+ <div
class="BottomCenterLoginDecorator"><span></span></div>
+ </div>
+ </div>
+ </div>
+</div>
+<script>
+ <%=uicomponent.event("Close");%>
+ window.location =
'http://localhost:8080/cas/login?service=http://localhost:1500/portal/private/classic';
+</script>
Added:
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp
(rev 0)
+++
jbossexo/modules/sso/trunk/agent/src/main/config/cas/portal.war/login/jsp/login.jsp 2009-11-16
04:18:58 UTC (rev 13831)
@@ -0,0 +1,39 @@
+<%--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ 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.
+
+--%>
+
+<%@ page import="java.net.URLEncoder"%>
+<%@ page import="javax.servlet.http.Cookie"%>
+<%@ page import="org.exoplatform.container.PortalContainer"%>
+<%@ page
import="org.exoplatform.services.resources.ResourceBundleService"%>
+<%@ page import="java.util.ResourceBundle"%>
+<%@ page import="org.exoplatform.web.login.InitiateLoginServlet"%>
+<%@ page language="java" %>
+<%@ page contentType="text/html; charset=utf-8" %>
+
+<html>
+ <head>
+ <script type="text/javascript">
+ window.location =
'http://localhost:8080/cas/login?service=http://localhost:1500/portal/private/classic';
+ </script>
+ </head>
+ <body>
+ </body>
+</html>
\ No newline at end of file
Added:
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
---
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl
(rev 0)
+++
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/groovy/portal/webui/UILoginForm.gtmpl 2009-11-16
04:18:58 UTC (rev 13831)
@@ -0,0 +1,87 @@
+<%
+ import org.exoplatform.web.application.JavascriptManager;
+ import javax.servlet.http.HttpSession;
+ def rcontext = _ctx.getRequestContext();
+ JavascriptManager jsmanager = rcontext.getJavascriptManager();
+ jsmanager.importJavascript('eXo.portal.UIPortalControl');
+ jsmanager.addCustomizedOnLoadScript('document.getElementById("UIPortalComponentLogin").username.focus();');
+ HttpSession session = rcontext.getRequest().getSession();
+ String requestPath = rcontext.getRequestContextPath() + "/private/" +
rcontext.getPortalOwner();
+ session.setAttribute("initialURI", requestPath);
+%>
+<div class="UILoginForm">
+ <div class="LoginDecorator">
+ <div class="TopLeftLoginDecorator">
+ <div class="TopRightLoginDecorator">
+ <div class="TopCenterLoginDecorator">
+ <div
class="SigninTitle"><%=_ctx.appRes("UILoginForm.label.Signin")%></div>
+ </div>
+ </div>
+ </div>
+ <div class="MiddleLeftLoginDecorator">
+ <div class="MiddleRightLoginDecorator">
+ <div class="LoginDecoratorBackground">
+ <div class="LoginDetailBox">
+ <% uiform.begin(); %>
+ <!--<form class="UIForm" id="$uicomponent.id"
name="loginForm" action="<%= rcontext.getRequestContextPath() +
"/login"%>" method="post" style="margin: 0px;">
+ <input type="hidden" name="<%= uiform.ACTION %>"
value=""/>-->
+ <input type="hidden" name="uri"
value="<%=session.getAttribute("initialURI"); %>"/>
+ <div class="VerticalLayout">
+ <table class="UIFormGrid">
+ <tr class="UserNameField">
+ <td
class="FieldLabel"><%=_ctx.appRes("UILoginForm.label.UserName")%></td>
+ <td><% uiform.renderChild(0)%></td>
+ </tr>
+ <tr class="PasswordField" id="UIPortalLoginFormControl"
onkeypress="eXo.portal.UIPortalControl.onEnterPress(event)">
+ <td
class="FieldLabel"><%=_ctx.appRes("UILoginForm.label.password")%></td>
+ <td><% uiform.renderChild(1)%></td>
+ </tr>
+ <tr class="RememberField"
onkeypress="eXo.portal.UIPortalControl.onEnterPress(event)">
+ <td class="FieldLabel"><%
uiform.renderChild(2)%></td>
+ <td><%=_ctx.appRes("UILoginForm.label.RememberOnComputer")%></td>
+ </tr>
+ </table>
+ <div class="ForgetPass"><a href="<%=
uicomponent.event("ForgetPassword")
%>"><%=_ctx.appRes("UILoginForm.label.forgot")%></a></div>
+ <div class="UIAction">
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div onclick="login(this);"
id="UIPortalLoginFormAction" class="ActionButton SimpleStyle">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a
href="#"><%=_ctx.appRes("UILoginForm.label.Signin");%></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div onclick="<%=uicomponent.event("Close");%>"
class="ActionButton SimpleStyle">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a
href="javascript:void(0);"><%=_ctx.appRes("UILoginForm.label.Discard")%></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <%uiform.end()%>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="BottomLeftLoginDecorator">
+ <div class="BottomRightLoginDecorator">
+ <div
class="BottomCenterLoginDecorator"><span></span></div>
+ </div>
+ </div>
+ </div>
+</div>
+<script>
+ <%=uicomponent.event("Close");%>
+ window.location =
'http://localhost:8080/josso/signon/login.do?josso_back_to=http://localhost:1500/portal/private/classic';
+</script>
Added:
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp
===================================================================
--- jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp
(rev 0)
+++
jbossexo/modules/sso/trunk/agent/src/main/config/josso/portal.war/login/jsp/login.jsp 2009-11-16
04:18:58 UTC (rev 13831)
@@ -0,0 +1,39 @@
+<%--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ 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.
+
+--%>
+
+<%@ page import="java.net.URLEncoder"%>
+<%@ page import="javax.servlet.http.Cookie"%>
+<%@ page import="org.exoplatform.container.PortalContainer"%>
+<%@ page
import="org.exoplatform.services.resources.ResourceBundleService"%>
+<%@ page import="java.util.ResourceBundle"%>
+<%@ page import="org.exoplatform.web.login.InitiateLoginServlet"%>
+<%@ page language="java" %>
+<%@ page contentType="text/html; charset=utf-8" %>
+
+<html>
+ <head>
+ <script type="text/javascript">
+ window.location =
'http://localhost:8080/josso/signon/login.do?josso_back_to=http://localhost:1500/portal/private/classic';
+ </script>
+ </head>
+ <body>
+ </body>
+</html>
\ No newline at end of file
Modified: jbossexo/modules/sso/trunk/pom.xml
===================================================================
--- jbossexo/modules/sso/trunk/pom.xml 2009-11-15 20:51:26 UTC (rev 13830)
+++ jbossexo/modules/sso/trunk/pom.xml 2009-11-16 04:18:58 UTC (rev 13831)
@@ -19,6 +19,14 @@
<name>Gatein Single Sign On Integration</name>
<
url>http://www.jboss.org/gatein</url>
<description>Gatein Single Sign On Integration</description>
+
+ <modules>
+ <module>agent</module>
+ <module>auth-callback</module>
+ <module>gatein-cas-plugin</module>
+ <module>gatein-josso-plugin</module>
+ <module>gatein-opensso-plugin</module>
+ </modules>
<properties>
<version.junit>3.8.1</version.junit>
@@ -50,14 +58,7 @@
<!-- JAX-RS jsr-311 -->
<version.javax.ws.rs>1.0</version.javax.ws.rs>
</properties>
-
- <modules>
- <module>auth-callback</module>
- <module>gatein-cas-plugin</module>
- <module>gatein-josso-plugin</module>
- <module>gatein-opensso-plugin</module>
- </modules>
-
+
<dependencyManagement>
<dependencies>
<!-- junit -->