You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by ra...@apache.org on 2011/08/28 04:32:40 UTC

svn commit: r1162471 - in /incubator/rave/sandbox/rave-extensions/rave-vanilla-extension: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/rave/ src/main/java/org/apache/rave/portal/ src/main/java/o...

Author: raminder
Date: Sun Aug 28 02:32:39 2011
New Revision: 1162471

URL: http://svn.apache.org/viewvc?rev=1162471&view=rev
Log:
Adding a sample extension folder which you can use to customize rave portal RAVE-214

Added:
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/pom.xml
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/org/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/org/apache/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/org/apache/rave/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/org/apache/rave/portal/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/org/apache/rave/portal/service/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/org/apache/rave/portal/service/impl/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/org/apache/rave/portal/service/impl/CustomUserService.java
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/META-INF/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/META-INF/MANIFEST.MF
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/WEB-INF/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/WEB-INF/applicationContext-security.xml
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/WEB-INF/web.xml
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/css/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/css/custom.css
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/images/
    incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/login.jsp

Added: incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/pom.xml?rev=1162471&view=auto
==============================================================================
--- incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/pom.xml (added)
+++ incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/pom.xml Sun Aug 28 02:32:39 2011
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+
+  $Id: pom.xml 1152919 2011-08-01 20:19:57Z jasha $
+-->
+<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>
+
+  <groupId>org.apache.rave</groupId>
+  <artifactId>rave-vanilla-extension</artifactId>
+	<name>Apache Rave :: rave-vanilla-extension</name>
+  <description>Apache Rave Project Sandbox</description>
+  <packaging>war</packaging>
+  <version>SNAPSHOT</version>
+  <properties>
+	 <scope.sharedlib>compile</scope.sharedlib>
+	 <cargo.version>1.1.0</cargo.version>
+	 <!-- if you want a remote debugging on a different a address
+			override on command line with -Dcargo.debug.addres=xxxx -->
+	 <cargo.debug.address>8000</cargo.debug.address>
+	 <!-- if you want to start remote debugging session suspended
+			override on command line with -Dcargo.debug.suspend=y -->
+	 <cargo.debug.suspend>n</cargo.debug.suspend>
+     <javaagent />
+  </properties>
+
+  <dependencies>
+
+	 <dependency>
+		<groupId>org.apache.rave</groupId>
+		<artifactId>rave-commons</artifactId>
+		<version>0.3-incubating-SNAPSHOT</version>
+	 </dependency>
+
+	 <!--The rave-portal.jar is needed for compilation -->
+	 <dependency>
+		<groupId>org.apache.rave</groupId>
+		<artifactId>rave-portal</artifactId>
+		<version>0.3-incubating-SNAPSHOT</version>
+		<type>jar</type>
+		<scope>provided</scope>
+	 </dependency>
+
+	 <!-- The rave-portal.war dependency is needed for running with cargo -->
+	 <dependency>
+		<groupId>org.apache.rave</groupId>
+		<artifactId>rave-portal</artifactId>
+		<version>0.3-incubating-SNAPSHOT</version>
+		<type>war</type>
+	 </dependency>
+
+	 <dependency>
+		<groupId>org.apache.rave</groupId>
+		<artifactId>rave-shindig</artifactId>
+		<type>war</type>
+		<version>0.3-incubating-SNAPSHOT</version>
+		<scope>provided</scope>
+	 </dependency>
+
+	    </dependencies>
+	<profiles>
+        <profile>
+            <id>dist</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.cargo</groupId>
+                        <artifactId>cargo-maven2-plugin</artifactId>
+                        <version>${cargo.version}</version>
+                        <executions>
+                            <execution>
+                                <id>dist-cargo-package</id>
+                                <phase>install</phase>
+                                <goals>
+                                    <goal>configure</goal>
+                                    <goal>package</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+	    </build>
+	</profile>
+    </profiles>
+
+    <build>
+      <defaultGoal>install</defaultGoal>
+      <plugins>
+	<plugin>
+	  <groupId>com.googlecode.mavenfilesync</groupId>
+	  <artifactId>maven-filesync-plugin</artifactId>
+	  <configuration>
+	    <mappings>
+	      <mapping>
+		<sourceFolder>src/main/webapp</sourceFolder>
+		<destinationFolder>@target/tomcat6x/webapps/portal</destinationFolder>
+	      </mapping>
+	      <mapping>
+		<sourceFolder>src/main/resources</sourceFolder>
+		<destinationFolder>@target/tomcat6x/webapps/portal/WEB-INF/classes</destinationFolder>
+	      </mapping>
+	    </mappings>
+	  </configuration>
+	</plugin>
+
+	<plugin>
+	  <groupId>com.github.searls</groupId>
+	  <artifactId>jasmine-maven-plugin</artifactId>
+	  <version>1.0.2-beta-2</version>
+	  <executions>
+	    <execution>
+	      <goals>
+		<goal>generateManualRunner</goal>
+		<goal>resources</goal>
+		<goal>testResources</goal>
+		<goal>test</goal>
+	      </goals>
+	      <configuration>
+		<jsSrcDir>${project.basedir}/src/main/webapp/script/</jsSrcDir>
+		<debug>true</debug>
+	      </configuration>
+	    </execution>
+	  </executions>
+	</plugin>
+
+	<plugin>
+	  <groupId>org.codehaus.cargo</groupId>
+	  <artifactId>cargo-maven2-plugin</artifactId>
+	  <extensions>true</extensions>
+	  <version>${cargo.version}</version>
+	  <configuration>
+	    <wait>true</wait>
+	    <configuration>
+	      <properties>
+		<cargo.jvmargs>
+		  <![CDATA[-Xdebug -Xrunjdwp:transport=dt_socket,address=${cargo.debug.address},server=y,suspend=${cargo.debug.suspend} -noverify ${javaagent}]]>
+		</cargo.jvmargs>
+		<cargo.tomcat.context.reloadable>true</cargo.tomcat.context.reloadable>
+	      </properties>
+	      <home>${project.build.directory}/tomcat6x</home>
+	      <deployables>
+		<deployable>
+		  <groupId>org.apache.rave</groupId>
+		  <artifactId>rave-shindig</artifactId>
+		  <type>war</type>
+		  <properties>
+		    <context>/ROOT</context>
+		  </properties>
+		</deployable>
+		<deployable>
+		  <groupId>org.apache.rave</groupId>
+		  <artifactId>rave-vanilla-extension</artifactId>
+		  <type>war</type>
+		  <properties>
+		    <context>/portal</context>
+		  </properties>
+		</deployable>
+	      </deployables>
+	    </configuration>
+	    <container>
+	      <containerId>tomcat6x</containerId>
+	      <timeout>180000</timeout>
+	      <zipUrlInstaller>
+		<url>
+		  http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz
+		</url>
+	      </zipUrlInstaller>
+	      <systemProperties>
+		<shindig.host>localhost</shindig.host>
+	      </systemProperties>
+	    </container>
+	  </configuration>
+	</plugin>
+      </plugins>
+    </build>
+  </project>
\ No newline at end of file

Added: incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/org/apache/rave/portal/service/impl/CustomUserService.java
URL: http://svn.apache.org/viewvc/incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/org/apache/rave/portal/service/impl/CustomUserService.java?rev=1162471&view=auto
==============================================================================
--- incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/org/apache/rave/portal/service/impl/CustomUserService.java (added)
+++ incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/java/org/apache/rave/portal/service/impl/CustomUserService.java Sun Aug 28 02:32:39 2011
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.rave.portal.service.impl;
+
+import org.apache.rave.portal.model.User;
+import org.apache.rave.portal.repository.UserRepository;
+import org.apache.rave.portal.service.UserService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.dao.DataAccessException;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.stereotype.Service;
+
+/**
+ * Custom User service is to demonstrate how you can extend userservice in RAVE and add additional information
+ *
+ */
+
+@Service(value = "customUserService")
+public class CustomUserService implements UserService {
+    protected static final Logger logger = LoggerFactory.getLogger(CustomUserService.class);
+    protected UserRepository userRepository;
+
+    @Autowired
+    public CustomUserService(UserRepository userRepository) {
+		  this.userRepository = userRepository;
+
+	}
+
+    @Override
+	 public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
+		logger.info("Custom User Serice called to get user informtion");
+        final User user = userRepository.getByUsername(username);
+        if(user == null) {
+            throw new UsernameNotFoundException("User with username '" + username + "' was not found!");
+        }
+	    fetchCustomCredential(user);
+        return user;
+    }
+
+	 /**
+	  * This method attempts to load the custom credential and decorates it with
+	  * additional attributes.
+	  */
+	 private void fetchCustomCredential(User user) {
+		  try {
+				logger.info("Decorating the credential for user" + user.getUsername());
+		 }
+		  catch (Exception e){
+				logger.warn("Unexpected GridShib error:" +e.getMessage());
+		  }
+	 }
+    @Override
+    public User getAuthenticatedUser() {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+
+        if (authentication != null && authentication.getPrincipal() instanceof User) {
+            return (User) authentication.getPrincipal();
+        } else {
+            throw new SecurityException("Could not get the authenticated user!");
+        }
+    }
+
+    @Override
+    public void setAuthenticatedUser(long userId) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void clearAuthenticatedUser() {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void registerNewUser(User user) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public User getUserByUsername(String userName) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public User getUserById(Long id) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public User getUserByEmail(String userEmail) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void updateUserProfile(User user) {
+        // TODO Auto-generated method stub
+
+    }
+
+}
\ No newline at end of file

Added: incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/META-INF/MANIFEST.MF?rev=1162471&view=auto
==============================================================================
--- incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/META-INF/MANIFEST.MF (added)
+++ incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/META-INF/MANIFEST.MF Sun Aug 28 02:32:39 2011
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Added: incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/WEB-INF/applicationContext-security.xml
URL: http://svn.apache.org/viewvc/incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/WEB-INF/applicationContext-security.xml?rev=1162471&view=auto
==============================================================================
--- incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/WEB-INF/applicationContext-security.xml (added)
+++ incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/WEB-INF/applicationContext-security.xml Sun Aug 28 02:32:39 2011
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in
+  ~ compliance with the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<!--
+	This security file uses the default spring simple form login
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:security="http://www.springframework.org/schema/security"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+			    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
+
+  <security:http auto-config="true" use-expressions="true" disable-url-rewriting="true">
+	 <security:intercept-url pattern="/newaccount.jsp*" access="permitAll"/>
+	 <security:intercept-url pattern="/app/newaccount*" access="permitAll"/>
+	 <security:intercept-url pattern="/login.jsp*" filters="none" />
+	 <security:intercept-url pattern="/css/**" access="permitAll"/>
+	 <security:intercept-url pattern="/images/**" access="permitAll"/>
+	 <security:intercept-url pattern="/script/**" access="permitAll"/>
+	 <!-- all urls must be authenticated -->
+	 <security:intercept-url pattern="/**"
+									 access="isAuthenticated()"/>
+	 <!-- Set the user service ref here to the implementation you want to use.  The name is
+			defined in the @Service annotation of the corresponding service source code.
+	 -->
+	 <security:openid-login user-service-ref="customUserService" authentication-failure-url="/login.jsp?authfail=openid">
+		<security:attribute-exchange>
+		  <!-- Supported by MyOpenID.com -->
+		  <security:openid-attribute name="firstName" type="http://schema.openid.net/namePerson/first"/>
+		  <security:openid-attribute name="lastName" type="http://schema.openid.net/namePerson/last"/>
+		  <security:openid-attribute name="email" type="http://schema.openid.net/contact/email" required="true"/>
+		  <!-- security:openid-attribute name="language" type="http://schema.openid.net/language/pref"/>
+				 <security:openid-attribute name="birthDate" type="http://schema.openid.net/birthDate"/>
+				 <security:openid-attribute name="namePerson" type="http://schema.openid.net/namePerson" required="true"/>
+				 <security:openid-attribute name="nickname" type="http://schema.openid.net/namePerson/friendly" required="true"/>
+				 <security:openid-attribute name="country" type="http://schema.openid.net/contact/country/home"/>
+		  -->
+		</security:attribute-exchange>
+	 </security:openid-login>
+	 <security:form-login login-page="/login.jsp" authentication-failure-url="/login.jsp?authfail=form"/>
+	 <security:logout/>
+  </security:http>
+
+  <security:authentication-manager>
+	 <!-- Set the user service ref here to the implementation you want to use.  The name is
+			defined in the @Service annotation of the corresponding service source code.
+	 -->
+	 <security:authentication-provider user-service-ref="customUserService">
+		<security:password-encoder ref="passwordEncoder">
+		  <security:salt-source ref="saltSource"/>
+		</security:password-encoder>
+	 </security:authentication-provider>
+  </security:authentication-manager>
+</beans>

Added: incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/WEB-INF/web.xml?rev=1162471&view=auto
==============================================================================
--- incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/WEB-INF/web.xml (added)
+++ incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/WEB-INF/web.xml Sun Aug 28 02:32:39 2011
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+  
+  $Id: web.xml 1153583 2011-08-03 17:02:45Z jcian $
+-->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="Shindig"
+         version="2.5">
+
+    <display-name>Rave Portal</display-name>
+
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>
+            /WEB-INF/dataContext.xml
+            /WEB-INF/applicationContext.xml
+            /WEB-INF/applicationContext-security.xml
+        </param-value>
+    </context-param>
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+    <filter>
+        <filter-name>springSecurityFilterChain</filter-name>
+        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+    </filter>
+    <filter-mapping>
+        <filter-name>springSecurityFilterChain</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+    <!-- Handles all requests into the application -->
+    <servlet>
+        <servlet-name>dispatcher</servlet-name>
+        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/app/*</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/index.html</url-pattern>
+    </servlet-mapping>
+
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
+
+
+</web-app>

Added: incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/css/custom.css
URL: http://svn.apache.org/viewvc/incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/css/custom.css?rev=1162471&view=auto
==============================================================================
--- incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/css/custom.css (added)
+++ incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/css/custom.css Sun Aug 28 02:32:39 2011
@@ -0,0 +1,50 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+body{
+height:100%;
+}
+
+body{
+background-color:#fff 320px;
+background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzllY2ZmNSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
+background-size:100%;
+background-image:-webkit-gradient(linear,50% 0,50% 320,color-stop(0%,#9ecff5),color-stop(100%,#fff));
+background-image:-webkit-linear-gradient(top,#9ecff5,#fff 320px);
+background-image:-moz-linear-gradient(top,#9ecff5,#fff 320px);
+background-image:-o-linear-gradient(top,#9ecff5,#fff 320px);
+background-image:-ms-linear-gradient(top,#9ecff5,#fff 320px);
+background-image:linear-gradient(top,#9ecff5,#fff 320px);
+background-repeat:no-repeat;background-image:-webkit-gradient(linear,0 0,0 320,from(#9ecff5),to(white));
+}
+.page {
+padding: 40px!important;
+}
+
+.dialog.center {
+left: 50%;
+margin-left: -265px;
+margin-top: -160px;
+position: absolute;
+top: 20%;
+width: 500px;
+}
+
+.dialog_content {
+position: relative;
+padding-bottom: 65px;
+}

Added: incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/login.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/login.jsp?rev=1162471&view=auto
==============================================================================
--- incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/login.jsp (added)
+++ incubator/rave/sandbox/rave-extensions/rave-vanilla-extension/src/main/webapp/login.jsp Sun Aug 28 02:32:39 2011
@@ -0,0 +1,101 @@
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  --%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<html>
+	<head>
+		<meta charset="UTF-8" />
+		<title><c:out value="Rave - Custom Login" /></title>
+		<link rel="stylesheet" href="<c:url value="/css/custom.css" />" />
+	</head>
+	<body class="b-mac b-ch b-css3 l-en">
+		<div class="page">
+			<div class="dialog center">
+				<div id="dialog_content">
+					<h1>Login</h1>
+					<div id="logins">
+					<h2>Username and Password</h2>
+					<form id="loginForm" name="loginForm"
+						action="j_spring_security_check" method="post">
+					<c:if test="${param['authfail'] eq 'form'}">
+						<p class="error">The username or password is incorrect.</p>
+					</c:if>
+					<fieldset>
+						<p>
+							<label for="usernameField">Username: </label> <input
+								id="usernameField" type="text" name="j_username" />
+						</p>
+
+						<p>
+							<label for="passwordField">Password: </label> <input
+								id="passwordField" type="password" name="j_password" />
+						</p>
+						<p>
+							<label for="remember_me" class="checkboxLabel"> <input
+								type='checkbox' name='_spring_security_remember_me'
+								id="remember_me" value="true" /> Remember me </label>
+						</p>
+					</fieldset>
+					<fieldset>
+						<input type="submit" value="Login" />
+					</fieldset>
+					</form>
+					</div>
+					<h2>New User</h2>
+					<form id="newAccount" action="<c:url value="/app/newaccount.jsp"/>"
+					method="get">
+					<fieldset>
+						<p>
+							<label for="createNewAccountButton">Register: </label> <input
+								id="createNewAccountButton" type="submit"
+								value="Create New Account" />
+						</p>
+					</fieldset>
+					</form>
+
+					<h2>OpenID Identity</h2>
+					<form id="oidForm" name='oidf'
+						action='j_spring_openid_security_check' method='POST'>
+					<c:if test="${param['authfail'] eq 'openid'}">
+						<p class="error">OpenID identification failed.</p>
+					</c:if>
+					<fieldset>
+						<p>
+							<label for="openid_identifier">Identity: </label> <input
+								type='text' id="openid_identifier" name='openid_identifier'
+								class="long" />
+						</p>
+						<p>
+							<label for="remember_me_openid" class="checkboxLabel"> <input
+								type='checkbox' name='_spring_security_remember_me'
+								id="remember_me_openid" value="true" /> Remember me </label>
+						</p>
+					</fieldset>
+					<fieldset>
+						<input type="submit" value="Login with OpenID" />
+					</fieldset>
+					</form>
+				</div>
+			</div>
+		</div>
+	<script>
+		document.loginForm.j_username.focus();
+	</script>
+</body>
+</html>
+