directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r545684 - in /directory/sandbox/erodriguez/kerberos-spnego: ./ src/ src/assembly/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/directory/ src/main/java/org/apache/directory/server/ src/main/...
Date Sat, 09 Jun 2007 02:34:53 GMT
Author: erodriguez
Date: Fri Jun  8 19:34:52 2007
New Revision: 545684

URL: http://svn.apache.org/viewvc?view=rev&rev=545684
Log:
Initial commit of example demonstrating Kerberos-authentication to a Wicket application.

Added:
    directory/sandbox/erodriguez/kerberos-spnego/   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/LICENSE.txt   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/pom.xml   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/
    directory/sandbox/erodriguez/kerberos-spnego/src/assembly/
    directory/sandbox/erodriguez/kerberos-spnego/src/assembly/bin.xml   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/commons-logging.properties   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/log4j.properties   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/AuthenticatedSpnegoPage.java   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.html   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.java   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.html   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.java   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.html   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.java   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInSpnego.java   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.html   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.java   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoApplication.java   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoPage.java   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoSession.java   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Start.java   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/main/resources/
    directory/sandbox/erodriguez/kerberos-spnego/src/main/resources/jetty-config.xml   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/webapp/
    directory/sandbox/erodriguez/kerberos-spnego/src/webapp/WEB-INF/
    directory/sandbox/erodriguez/kerberos-spnego/src/webapp/WEB-INF/web.xml   (with props)
    directory/sandbox/erodriguez/kerberos-spnego/src/webapp/index.html   (with props)

Propchange: directory/sandbox/erodriguez/kerberos-spnego/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jun  8 19:34:52 2007
@@ -0,0 +1,16 @@
+bin
+build
+target
+classes
+.classpath
+.project
+.settings
+.wtpmodules
+.deployables
+*.iml
+*.ipr
+*.iws
+*.log
+lib
+bundle
+dist

Added: directory/sandbox/erodriguez/kerberos-spnego/LICENSE.txt
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/LICENSE.txt?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/LICENSE.txt (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/LICENSE.txt Fri Jun  8 19:34:52 2007
@@ -0,0 +1,176 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS

Propchange: directory/sandbox/erodriguez/kerberos-spnego/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/pom.xml?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/pom.xml (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/pom.xml Fri Jun  8 19:34:52 2007
@@ -0,0 +1,122 @@
+<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>
+        <groupId>org.apache.directory.server</groupId>
+        <artifactId>build</artifactId>
+        <version>1.5.1-SNAPSHOT</version>
+    </parent>
+    <artifactId>apacheds-kerberos-spnego</artifactId>
+    <name>ApacheDS Kerberos SPNEGO HTTP Example</name>
+    <packaging>war</packaging>
+    <description> An example Wicket application demonstrating Kerberos (SPNEGO)
+        authentication to a Wicket application.</description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.directory.shared</groupId>
+            <artifactId>shared-ldap</artifactId>
+            <version>0.9.7-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>nlog4j</artifactId>
+            <version>1.2.25</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>wicket</groupId>
+            <artifactId>wicket</artifactId>
+            <version>1.2.5</version>
+        </dependency>
+        <dependency>
+            <groupId>jetty</groupId>
+            <artifactId>org.mortbay.jetty</artifactId>
+            <version>4.2.24</version>
+            <type>jar</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>tomcat</groupId>
+            <artifactId>jasper-compiler</artifactId>
+            <version>4.1.30</version>
+            <type>jar</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>tomcat</groupId>
+            <artifactId>jasper-runtime</artifactId>
+            <version>4.1.30</version>
+            <type>jar</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.3</version>
+            <type>jar</type>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <resources>
+            <resource>
+                <filtering>false</filtering>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**</include>
+                </includes>
+                <excludes>
+                    <exclude>**/*.java</exclude>
+                </excludes>
+            </resource>
+        </resources>
+        <testResources>
+            <testResource>
+                <filtering>false</filtering>
+                <directory>src/main/test</directory>
+                <includes>
+                    <include>**</include>
+                </includes>
+                <excludes>
+                    <exclude>**/*.java</exclude>
+                </excludes>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <appendAssemblyId>false</appendAssemblyId>
+                    <descriptors>
+                        <descriptor>src/assembly/bin.xml</descriptor>
+                    </descriptors>
+                    <finalName>${artifactId}-${version}</finalName>
+                    <outputDirectory>target/distributions</outputDirectory>
+                    <workDirectory>target/assembly/work</workDirectory>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <webXml>${basedir}/src/webapp/WEB-INF/web.xml</webXml>
+                    <warName>spnego-example</warName>
+                    <warSourceDirectory>src/webapp</warSourceDirectory>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <includes>
+                        <include>**/*Test.java</include>
+                    </includes>
+                    <testFailureIgnore>true</testFailureIgnore>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: directory/sandbox/erodriguez/kerberos-spnego/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/assembly/bin.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/assembly/bin.xml?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/assembly/bin.xml (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/assembly/bin.xml Fri Jun  8 19:34:52 2007
@@ -0,0 +1,49 @@
+<assembly>
+	<id>bin</id>
+	<formats>
+		<format>tar.gz</format>
+		<format>zip</format>
+	</formats>
+	<fileSets>
+		<fileSet>
+			<includes>
+				<include>README*</include>
+				<include>LICENSE*</include>
+				<include>NOTICE*</include>
+				<include>pom.xml</include>
+				<include>project.xml</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>src/assembly</directory>
+			<outputDirectory></outputDirectory>
+			<includes>
+				<include>build.xml</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>src</directory>
+			<outputDirectory>src</outputDirectory>
+			<includes>
+				<include>**/*</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>target/site</directory>
+			<outputDirectory>docs</outputDirectory>
+			<includes>
+				<include>**/*</include>
+			</includes>
+			<excludes>
+				<exclude>**/*swf</exclude>
+			</excludes>
+		</fileSet>
+	</fileSets>
+	<dependencySets>
+		<dependencySet>
+			<outputDirectory>lib</outputDirectory>
+			<unpack>false</unpack>
+			<scope>compile</scope>
+		</dependencySet>
+	</dependencySets>
+</assembly>

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/assembly/bin.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/commons-logging.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/commons-logging.properties?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/commons-logging.properties (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/commons-logging.properties Fri Jun  8 19:34:52 2007
@@ -0,0 +1,2 @@
+#org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/commons-logging.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/log4j.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/log4j.properties?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/log4j.properties (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/log4j.properties Fri Jun  8 19:34:52 2007
@@ -0,0 +1,21 @@
+log4j.debug=false
+
+log4j.rootLogger=DEBUG,Stdout
+log4j.logger.org=INFO
+log4j.logger.com=INFO
+log4j.logger.net=INFO
+log4j.logger.nl=INFO
+
+log4j.logger.wicket=INFO
+
+log4j.logger.wicket.protocol.http.HttpSessionStore=INFO
+log4j.logger.org.apache.catalina.cluster=DEBUG
+
+log4j.logger.wicket.version=INFO
+log4j.logger.wicket.RequestCycle=INFO
+
+log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n
+
+log4j.logger.org.apache.directory.server=DEBUG

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/AuthenticatedSpnegoPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/AuthenticatedSpnegoPage.java?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/AuthenticatedSpnegoPage.java (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/AuthenticatedSpnegoPage.java Fri Jun  8 19:34:52 2007
@@ -0,0 +1,33 @@
+/*
+ *  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.directory.server.spnego;
+
+
+/**
+ * Base class to check access to a page. If user is not logged in, redirect to
+ * the log-in page.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class AuthenticatedSpnegoPage extends SpnegoPage
+{
+    // Marker abstract class to identify web pages requiring authentication. 
+}

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/AuthenticatedSpnegoPage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.html
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.html?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.html (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.html Fri Jun  8 19:34:52 2007
@@ -0,0 +1,10 @@
+<html>
+    <head>
+        <title>Spnego Example</title>
+        <link rel="stylesheet" type="text/css" href="style.css"/>
+    </head>
+    <body>
+        <h2>Welcome, <span wicket:id = "username">My Username</span>!</h2>
+        <a wicket:id="goToSignOut">Sign Out</a>
+    </body>
+</html>

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.java
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.java?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.java (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.java Fri Jun  8 19:34:52 2007
@@ -0,0 +1,53 @@
+/*
+ *  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.directory.server.spnego;
+
+
+import wicket.markup.html.basic.Label;
+import wicket.markup.html.link.BookmarkablePageLink;
+
+
+/**
+ * Application's home page.  This page requires authentication.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Home extends AuthenticatedSpnegoPage
+{
+    /** 
+     * The class fingerprint that is set to indicate serialization
+     * compatibility with a previous version of the class.
+     */
+    private static final long serialVersionUID = -2912101622371082950L;
+
+
+    /**
+     * Creates a new instance of Home.
+     */
+    public Home()
+    {
+        String username = getSpnegoSession().getUser();
+
+        add( new Label( "username", username ) );
+
+        add( new BookmarkablePageLink( "goToSignOut", SignOut.class ) );
+    }
+}

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Home.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.html
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.html?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.html (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.html Fri Jun  8 19:34:52 2007
@@ -0,0 +1,11 @@
+<html>
+    <head>
+        <title>Spnego Example</title>
+        <link rel="stylesheet" type="text/css" href="style.css"/>
+    </head>
+    <body>
+        <p> <i>Username is 'hnelson' and password is 's3crEt'.</i> </p>
+        <span wicket:id="signInPanel"/>
+        <a wicket:id="goToSignInSpnego">Sign In with SPNEGO/Kerberos</a>
+    </body>
+</html>

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.java
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.java?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.java (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.java Fri Jun  8 19:34:52 2007
@@ -0,0 +1,60 @@
+/*
+ *  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.directory.server.spnego;
+
+
+import wicket.markup.html.link.BookmarkablePageLink;
+
+
+/**
+ * Simple example of a sign in page. It extends {@link SpnegoPage}, a base class which
+ * provide standard functionality for typical log-in pages.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public final class SignIn extends SpnegoPage
+{
+    /** 
+     * The class fingerprint that is set to indicate serialization
+     * compatibility with a previous version of the class.
+     */
+    private static final long serialVersionUID = -1288813334752130497L;
+
+
+    /**
+     * Creates a new instance of SignIn.
+     */
+    public SignIn()
+    {
+        add( new SignInPanel( "signInPanel" )
+        {
+            private static final long serialVersionUID = 7030370521688632220L;
+
+
+            public boolean signIn( String username, String password )
+            {
+                return ( ( SpnegoSession ) getSession() ).authenticate( username, password );
+            }
+        } );
+
+        add( new BookmarkablePageLink( "goToSignInSpnego", SignInSpnego.class ) );
+    }
+}

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignIn.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.html
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.html?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.html (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.html Fri Jun  8 19:34:52 2007
@@ -0,0 +1,34 @@
+<html xmlns:wicket>
+    <body>
+      <wicket:panel>
+        <span wicket:id="feedback"/>
+            <form wicket:id="signInForm">
+                <table>
+                    <tr>
+                        <td align="right">Username:</td>
+                        <td>
+                            <input wicket:id="username" type="text" value="foo@goo.moo" size="30"/>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td align="right">Password:</td>
+                        <td>
+                            <input wicket:id="password" type="password" value="password" size="30"/>
+                        </td>
+                    </tr>
+                    <tr wicket:id="rememberMeRow">
+                        <td></td>
+                        <td> <input wicket:id="rememberMe" type="checkbox" /> Remember Me </td>
+                    </tr>
+                    <tr>
+                        <td></td>
+                        <td>
+                            <input type="submit" name="submit" value="Sign In"/>
+                            <input type="reset" value="Reset"/>
+                        </td>
+                    </tr>
+                </table>
+            </form>
+      </wicket:panel>
+    </body>
+</html>

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.java
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.java?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.java (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.java Fri Jun  8 19:34:52 2007
@@ -0,0 +1,240 @@
+/*
+ *  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.directory.server.spnego;
+
+
+import wicket.PageParameters;
+import wicket.markup.html.WebMarkupContainer;
+import wicket.markup.html.form.CheckBox;
+import wicket.markup.html.form.Form;
+import wicket.markup.html.form.PasswordTextField;
+import wicket.markup.html.form.TextField;
+import wicket.markup.html.panel.FeedbackPanel;
+import wicket.markup.html.panel.Panel;
+import wicket.model.PropertyModel;
+import wicket.util.value.ValueMap;
+
+
+/**
+ * Reusable user sign in panel with username and password as well as support for
+ * cookie persistence of the both. When the SignInPanel's form is submitted, the
+ * abstract method signIn(String, String) is called, passing the username and
+ * password submitted. The signIn() method should sign the user in and return
+ * null if no error ocurred, or a descriptive String in the event that the sign
+ * in fails.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class SignInPanel extends Panel
+{
+    /** True if the panel should display a remember-me checkbox */
+    private boolean includeRememberMe = true;
+
+    /** Field for password. */
+    private PasswordTextField password;
+
+    /** True if the user should be remembered via form persistence (cookies) */
+    private boolean rememberMe = true;
+
+    /** Field for user name. */
+    private TextField username;
+
+    /**
+     * Sign in form.
+     */
+    public final class SignInForm extends Form
+    {
+        /** 
+         * The class fingerprint that is set to indicate serialization
+         * compatibility with a previous version of the class.
+         */
+        private static final long serialVersionUID = 1040978857715063488L;
+
+        /** El-cheapo model for form. */
+        private final ValueMap properties = new ValueMap();
+
+
+        /**
+         * Creates a new instance of SignInForm.
+         * 
+         * @param id id of the form component
+         */
+        public SignInForm( final String id )
+        {
+            super( id );
+
+            // Attach textfield components that edit properties map
+            // in lieu of a formal beans model
+            add( username = new TextField( "username", new PropertyModel( properties, "username" ) ) );
+            add( password = new PasswordTextField( "password", new PropertyModel( properties, "password" ) ) );
+
+            // MarkupContainer row for remember me checkbox
+            WebMarkupContainer rememberMeRow = new WebMarkupContainer( "rememberMeRow" );
+            add( rememberMeRow );
+
+            // Add rememberMe checkbox
+            rememberMeRow.add( new CheckBox( "rememberMe", new PropertyModel( SignInPanel.this, "rememberMe" ) ) );
+
+            // Make form values persistent
+            setPersistent( rememberMe );
+
+            // Show remember me checkbox?
+            rememberMeRow.setVisible( includeRememberMe );
+        }
+
+
+        /**
+         * @see wicket.markup.html.form.Form#onSubmit()
+         */
+        public final void onSubmit()
+        {
+            if ( signIn( getUsername(), getPassword() ) )
+            {
+                // If login has been called because the user was not yet
+                // logged in, than continue to the original destination,
+                // otherwise to the Home page
+                if ( !continueToOriginalDestination() )
+                {
+                    setResponsePage( getApplication().getSessionSettings().getPageFactory().newPage(
+                        getApplication().getHomePage(), ( PageParameters ) null ) );
+                }
+            }
+            else
+            {
+                // Try the component based localizer first. If not found try the
+                // application localizer. Else use the default
+                final String errmsg = getLocalizer().getString( "loginError", this, "Unable to sign you in" );
+
+                error( errmsg );
+            }
+        }
+    }
+
+
+    /**
+     * @see wicket.Component#Component(String)
+     */
+    public SignInPanel( final String id )
+    {
+        this( id, true );
+    }
+
+
+    /**
+     * Creates a new instance of SignInPanel.
+     * 
+     * @param id See Component constructor
+     * @param includeRememberMe True if form should include a remember-me checkbox
+     * @see wicket.Component#Component(String)
+     */
+    public SignInPanel( final String id, final boolean includeRememberMe )
+    {
+        super( id );
+
+        this.includeRememberMe = includeRememberMe;
+
+        // Create feedback panel and add to page
+        final FeedbackPanel feedback = new FeedbackPanel( "feedback" );
+        add( feedback );
+
+        // Add sign-in form to page, passing feedback panel as
+        // validation error handler
+        add( new SignInForm( "signInForm" ) );
+    }
+
+
+    /**
+     * Removes persisted form data for the signin panel (forget me)
+     */
+    public final void forgetMe()
+    {
+        // Remove persisted user data. Search for child component
+        // of type SignInForm and remove its related persistence values.
+        getPage().removePersistedFormData( SignInPanel.SignInForm.class, true );
+    }
+
+
+    /**
+     * Convenience method to access the password.
+     * 
+     * @return The password
+     */
+    public String getPassword()
+    {
+        return password.getModelObjectAsString();
+    }
+
+
+    /**
+     * Get model object of the rememberMe checkbox
+     * 
+     * @return True if user should be remembered in the future
+     */
+    public boolean getRememberMe()
+    {
+        return rememberMe;
+    }
+
+
+    /**
+     * Convenience method to access the username.
+     * 
+     * @return The user name
+     */
+    public String getUsername()
+    {
+        return username.getModelObjectAsString();
+    }
+
+
+    /**
+     * Convenience method set persistence for username and password.
+     * 
+     * @param enable Whether the fields should be persistent
+     */
+    public void setPersistent( boolean enable )
+    {
+        username.setPersistent( enable );
+        password.setPersistent( enable );
+    }
+
+
+    /**
+     * Set model object for rememberMe checkbox
+     * 
+     * @param rememberMe
+     */
+    public void setRememberMe( boolean rememberMe )
+    {
+        this.rememberMe = rememberMe;
+        this.setPersistent( rememberMe );
+    }
+
+
+    /**
+     * Sign in user if possible.
+     * 
+     * @param username The username
+     * @param password The password
+     * @return True if signin was successful
+     */
+    public abstract boolean signIn( final String username, final String password );
+}

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInPanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInSpnego.java
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInSpnego.java?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInSpnego.java (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInSpnego.java Fri Jun  8 19:34:52 2007
@@ -0,0 +1,317 @@
+/*
+ *  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.directory.server.spnego;
+
+
+import java.security.Principal;
+import java.util.Arrays;
+
+import javax.security.auth.Subject;
+import javax.security.auth.kerberos.KerberosPrincipal;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.directory.shared.ldap.util.Base64;
+import org.ietf.jgss.GSSContext;
+import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSException;
+import org.ietf.jgss.GSSManager;
+import org.ietf.jgss.GSSName;
+import org.ietf.jgss.Oid;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import wicket.markup.MarkupStream;
+import wicket.protocol.http.WebRequest;
+import wicket.protocol.http.WebResponse;
+
+
+/**
+ * Simple example of a sign-in page that processes SPNEGO GSS-API Kerberos
+ * authentication.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SignInSpnego extends SpnegoPage
+{
+    /** 
+     * The class fingerprint that is set to indicate serialization
+     * compatibility with a previous version of the class.
+     */
+    private static final long serialVersionUID = -5758605525922193895L;
+
+    private static final Logger log = LoggerFactory.getLogger( SignInSpnego.class );
+
+    /**
+     * Constant for the header lead for the unsupported NTLM mechanism.
+     */
+    private static final byte NTLMSSP[] =
+        { ( byte ) 0x4E, ( byte ) 0x54, ( byte ) 0x4C, ( byte ) 0x4D, ( byte ) 0x53, ( byte ) 0x53, ( byte ) 0x50 };
+
+
+    /**
+     * Creates a new instance of SignInSpnego.
+     */
+    public SignInSpnego()
+    {
+        System.setProperty( "java.security.auth.login.config", "/path/to/http_krb5.config" );
+        System.setProperty( "javax.security.auth.useSubjectCredsOnly", "false" );
+        System.setProperty( "sun.security.spnego.msinterop", "false" ); // true by default
+        System.setProperty( "sun.security.spnego.debug", "false" ); // false by default
+    }
+
+
+    /**
+     * Upon rendering this page, we access the HTTP request and response.  The
+     * request must contain the Negotiate header.  We use the response to
+     * challenge for the Negotiate header if it is not present and, optionally,
+     * for the GSS-API mechanism to return tokens to the client.
+     * 
+     * @param markupStream
+     */
+    protected void onRender( MarkupStream markupStream )
+    {
+        WebRequest webRequest = ( WebRequest ) getRequestCycle().getRequest();
+        WebResponse webResponse = ( WebResponse ) getRequestCycle().getResponse();
+
+        HttpServletRequest request = webRequest.getHttpServletRequest();
+        HttpServletResponse response = webResponse.getHttpServletResponse();
+
+        checkLoginStatus();
+
+        try
+        {
+            attemptNegotiation( request, response );
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
+        }
+
+        checkLoginStatus();
+    }
+
+
+    protected void checkLoginStatus()
+    {
+        SpnegoSession session = getSpnegoSession();
+
+        if ( session.isSignedIn() )
+        {
+            if ( !continueToOriginalDestination() )
+            {
+                setResponsePage( getApplication().getSessionSettings().getPageFactory().newPage( Home.class ) );
+            }
+        }
+    }
+
+
+    /**
+     * Use of Kerberos is wrapped in an HTTP auth-scheme of "Negotiate".
+     * The auth-params exchanged use data formats defined for use with the
+     * GSS-API [RFC 2743].  In particular, they follow the formats set for
+     * the SPNEGO [RFC 4178] and Kerberos [RFC 4121] mechanisms for GSSAPI.
+     * The "Negotiate" auth-scheme calls for the use of SPNEGO GSSAPI tokens
+     * that the specific mechanism type specifies.
+     * 
+     * The current implementation of this protocol is limited to the use of
+     * SPNEGO with the Kerberos protocol.
+     * 
+     * @param request
+     * @param response
+     * @throws ServletException
+     */
+    protected void attemptNegotiation( HttpServletRequest request, HttpServletResponse response )
+        throws ServletException
+    {
+        log.debug( "Attempting negotiation." );
+
+        String header = request.getHeader( "Authorization" );
+
+        /**
+         * Guard clause to check for Negotiate header.
+         * 
+         * If the server receives a request for an access-protected object, and
+         * if an acceptable Authorization header has not been sent, the server
+         * responds with a "401 Unauthorized" status code, and a "WWW-Authenticate:"
+         * header as per the framework described in [RFC 2616].  The initial
+         * WWW-Authenticate header will not carry any gssapi-data.
+         */
+        if ( header == null || header.length() < 10 || !header.startsWith( "Negotiate " ) )
+        {
+            response.setHeader( "WWW-Authenticate", "Negotiate" );
+            response.setStatus( HttpServletResponse.SC_UNAUTHORIZED );
+            log.debug( "Proper authorization header not found, returning challenge." );
+            return;
+        }
+
+        /**
+         * A client may initiate a connection to the server with an
+         * "Authorization" header containing the initial token for the server.
+         * This form will bypass the initial 401 error from the server when the
+         * client knows that the server will accept the Negotiate HTTP
+         * authentication type.
+         */
+        log.debug( "Authorization header found, continuing negotiation." );
+
+        /**
+         * The data following the word Negotiate is the GSS-API data to process. 
+         */
+        byte gssapiData[] = Base64.decode( header.substring( 10 ).toCharArray() );
+
+        /**
+         * Guard clause to check for the unsupported NTLM authentication mechanism.
+         */
+        if ( isNtlmMechanism( gssapiData ) )
+        {
+            log.warn( "Got request for unsupported NTLM mechanism, aborting negotiation." );
+            return;
+        }
+
+        /**
+         * The server attempts to establish a security context.  Establishment may result in
+         * tokens that the server must return to the client.  Tokens are BASE-64 encoded
+         * GSS-API data.
+         */
+        GSSContext context = null;
+        String outToken = null;
+
+        try
+        {
+            GSSManager manager = GSSManager.getInstance();
+
+            Oid spnegoOid = new Oid( "1.3.6.1.5.5.2" );
+            GSSCredential serverCreds = manager.createCredential( null, GSSCredential.DEFAULT_LIFETIME, spnegoOid,
+                GSSCredential.ACCEPT_ONLY );
+
+            context = manager.createContext( serverCreds );
+
+            byte tokenBytes[] = context.acceptSecContext( gssapiData, 0, gssapiData.length );
+            outToken = new String( Base64.encode( tokenBytes ) );
+        }
+        catch ( GSSException gsse )
+        {
+            gsse.printStackTrace();
+            log.error( "GSSException:       " + gsse.getMessage() );
+            log.error( "GSSException major: " + gsse.getMajorString() );
+            log.error( "GSSException minor: " + gsse.getMinorString() );
+            throw new ServletException( gsse );
+        }
+
+        /**
+         * If the context is established, we can attempt to retrieve the name of the "context
+         * initiator."  In the case of the Kerberos mechanism, the context initiator is the
+         * Kerberos principal of the client.  Additionally, the client may be delegating
+         * credentials.
+         */
+        if ( context != null && context.isEstablished() )
+        {
+            log.debug( "Context established, attempting Kerberos principal retrieval." );
+
+            try
+            {
+                Subject subject = new Subject();
+                GSSName clientGSSName = context.getSrcName();
+                Principal clientPrincipal = new KerberosPrincipal( clientGSSName.toString() );
+                subject.getPrincipals().add( clientPrincipal );
+                log.info( "Got client Kerberos principal: " + clientGSSName );
+
+                if ( context.getCredDelegState() )
+                {
+                    GSSCredential delegateCredential = context.getDelegCred();
+                    GSSName delegateGSSName = delegateCredential.getName();
+                    Principal delegatePrincipal = new KerberosPrincipal( delegateGSSName.toString() );
+                    subject.getPrincipals().add( delegatePrincipal );
+                    subject.getPrivateCredentials().add( delegateCredential );
+                    log.info( "Got delegated Kerberos principal: " + delegateGSSName );
+                }
+
+                getSpnegoSession().setUser( clientGSSName.toString() );
+
+                /**
+                 * A status code 200 status response can also carry a "WWW-Authenticate"
+                 * response header containing the final leg of an authentication.  In
+                 * this case, the gssapi-data will be present.
+                 */
+                if ( outToken != null && outToken.length() > 0 )
+                {
+                    response.setHeader( "WWW-Authenticate", "Negotiate " + outToken.getBytes() );
+                    response.setStatus( HttpServletResponse.SC_OK );
+                    log.debug( "Returning final authentication data to client to complete context." );
+                    return;
+                }
+            }
+            catch ( GSSException gsse )
+            {
+                log.error( "GSSException:       " + gsse.getMessage() );
+                log.error( "GSSException major: " + gsse.getMajorString() );
+                log.error( "GSSException minor: " + gsse.getMinorString() );
+
+                response.addHeader( "Client-Warning", gsse.getMessage() );
+                response.setStatus( HttpServletResponse.SC_UNAUTHORIZED );
+            }
+        }
+        else
+        {
+            /**
+             * Any returned code other than a success 2xx code represents an
+             * authentication error.  If a 401 containing a "WWW-Authenticate"
+             * header with "Negotiate" and gssapi-data is returned from the server,
+             * it is a continuation of the authentication request.
+             */
+            if ( outToken != null && outToken.length() > 0 )
+            {
+                response.setHeader( "WWW-Authenticate", "Negotiate " + outToken.getBytes() );
+                response.setStatus( HttpServletResponse.SC_UNAUTHORIZED );
+                log.debug( "Additional authentication processing required, returning token." );
+                return;
+            }
+            else
+            {
+                response.setStatus( HttpServletResponse.SC_UNAUTHORIZED );
+                log.warn( "Kerberos negotiation failed." );
+            }
+        }
+
+        log.debug( "Negotiation completed." );
+    }
+
+
+    /**
+     * Check whether the Authorization header is attempting the unsupported 
+     * NTLM mechanism.
+     * 
+     * @param gssapiData Byte array retrieved from the Authorization header.
+     * @return true If the header contains an NTLM mechanism request.
+     */
+    protected boolean isNtlmMechanism( byte[] gssapiData )
+    {
+        byte leadingBytes[] = new byte[7];
+        System.arraycopy( gssapiData, 0, leadingBytes, 0, 7 );
+        if ( Arrays.equals( leadingBytes, NTLMSSP ) )
+        {
+            return true;
+        }
+
+        return false;
+    }
+}

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignInSpnego.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.html
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.html?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.html (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.html Fri Jun  8 19:34:52 2007
@@ -0,0 +1,11 @@
+<html>
+    <head>
+        <title>Spnego Example</title>
+        <link rel="stylesheet" type="text/css" href="style.css"/>
+    </head>
+    <body>
+        <h2>Goodbye!</h2>
+        <wicket:link><a href="Home.html">Home</a>
+        </wicket:link>
+    </body>
+</html>

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.java
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.java?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.java (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.java Fri Jun  8 19:34:52 2007
@@ -0,0 +1,51 @@
+/*
+ *  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.directory.server.spnego;
+
+
+/**
+ * Simple logout page.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SignOut extends AuthenticatedSpnegoPage
+{
+    /** 
+     * The class fingerprint that is set to indicate serialization
+     * compatibility with a previous version of the class.
+     */
+    private static final long serialVersionUID = -1730305887215190432L;
+
+
+    protected void onEndRequest()
+    {
+        getSession().invalidate();
+
+        try
+        {
+            getWebRequestCycle().getWebResponse().getHttpServletResponse().sendRedirect( "app" );
+        }
+        catch ( Exception e )
+        {
+            // Do nothing.
+        }
+    }
+}

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SignOut.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoApplication.java
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoApplication.java?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoApplication.java (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoApplication.java Fri Jun  8 19:34:52 2007
@@ -0,0 +1,111 @@
+/*
+ *  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.directory.server.spnego;
+
+
+import wicket.Component;
+import wicket.ISessionFactory;
+import wicket.RestartResponseAtInterceptPageException;
+import wicket.Session;
+import wicket.authorization.Action;
+import wicket.authorization.IAuthorizationStrategy;
+import wicket.protocol.http.WebApplication;
+import wicket.protocol.http.request.CryptedUrlWebRequestCodingStrategy;
+import wicket.protocol.http.request.WebRequestCodingStrategy;
+import wicket.request.IRequestCycleProcessor;
+import wicket.request.compound.CompoundRequestCycleProcessor;
+
+
+/**
+ * Web application for demonstrating Kerberos single sign-on with SPNEGO.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public final class SpnegoApplication extends WebApplication
+{
+    /**
+     * @see wicket.examples.WicketExampleApplication#init()
+     */
+    protected void init()
+    {
+        super.init();
+
+        getSecuritySettings().setAuthorizationStrategy( new IAuthorizationStrategy()
+        {
+            public boolean isActionAuthorized( Component component, Action action )
+            {
+                return true;
+            }
+
+
+            public boolean isInstantiationAuthorized( Class componentClass )
+            {
+                if ( AuthenticatedSpnegoPage.class.isAssignableFrom( componentClass ) )
+                {
+                    // Is user signed in?
+                    if ( ( ( SpnegoSession ) Session.get() ).isSignedIn() )
+                    {
+                        // okay to proceed
+                        return true;
+                    }
+
+                    // Force sign in
+                    throw new RestartResponseAtInterceptPageException( SignIn.class );
+                }
+                return true;
+            }
+        } );
+    }
+
+
+    /**
+     * @see wicket.protocol.http.WebApplication#getSessionFactory()
+     */
+    public ISessionFactory getSessionFactory()
+    {
+        return new ISessionFactory()
+        {
+            public Session newSession()
+            {
+                return new SpnegoSession( SpnegoApplication.this );
+            }
+        };
+    }
+
+
+    /**
+     * @see wicket.protocol.http.WebApplication#newRequestCycleProcessor()
+     */
+    protected IRequestCycleProcessor newRequestCycleProcessor()
+    {
+        return new CompoundRequestCycleProcessor( new CryptedUrlWebRequestCodingStrategy(
+            new WebRequestCodingStrategy() ), null, null, null, null );
+    }
+
+
+    /**
+     * @see wicket.Application#getHomePage()
+     */
+    public Class getHomePage()
+    {
+        return Home.class;
+    }
+}

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoApplication.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoPage.java?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoPage.java (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoPage.java Fri Jun  8 19:34:52 2007
@@ -0,0 +1,45 @@
+/*
+ *  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.directory.server.spnego;
+
+
+import wicket.markup.html.WebPage;
+
+
+/**
+ * Base class for all pages in the Spnego web application. Any page which
+ * subclasses this page can get session properties from SpnegoSession via
+ * getSpnegoSession().
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class SpnegoPage extends WebPage
+{
+    /**
+     * Get downcast session object for easy access by subclasses.
+     * 
+     * @return The session.
+     */
+    public SpnegoSession getSpnegoSession()
+    {
+        return ( SpnegoSession ) getSession();
+    }
+}

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoPage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoSession.java
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoSession.java?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoSession.java (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoSession.java Fri Jun  8 19:34:52 2007
@@ -0,0 +1,104 @@
+/*
+ *  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.directory.server.spnego;
+
+
+import wicket.protocol.http.WebApplication;
+import wicket.protocol.http.WebSession;
+
+
+/**
+ * Session class for signin example. Holds and authenticates users.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public final class SpnegoSession extends WebSession
+{
+    /** 
+     * The class fingerprint that is set to indicate serialization
+     * compatibility with a previous version of the class.
+     */
+    private static final long serialVersionUID = 4953955070183675976L;
+
+    /** Trivial user representation */
+    private String user;
+
+
+    /**
+     * Creates a new instance of SpnegoSession.
+     *
+     * @param application
+     */
+    protected SpnegoSession( final WebApplication application )
+    {
+        super( application );
+    }
+
+
+    /**
+     * Checks the given username and password, returning a User object if if the
+     * username and password identify a valid user.
+     * 
+     * @param username The username.
+     * @param password The password.
+     * @return True if the user was authenticated
+     */
+    public final boolean authenticate( final String username, final String password )
+    {
+        if ( user == null )
+        {
+            // Trivial password "db"
+            if ( "hnelson".equalsIgnoreCase( username ) && "s3crEt".equalsIgnoreCase( password ) )
+            {
+                user = username;
+            }
+        }
+
+        return user != null;
+    }
+
+
+    /**
+     * @return True if the user is signed in.
+     */
+    public boolean isSignedIn()
+    {
+        return user != null;
+    }
+
+
+    /**
+     * @return The user.
+     */
+    public String getUser()
+    {
+        return user;
+    }
+
+
+    /**
+     * @param user The new user.
+     */
+    public void setUser( final String user )
+    {
+        this.user = user;
+    }
+}

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/SpnegoSession.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Start.java
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Start.java?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Start.java (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Start.java Fri Jun  8 19:34:52 2007
@@ -0,0 +1,84 @@
+/*
+ *  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.directory.server.spnego;
+
+
+import java.net.URL;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mortbay.jetty.Server;
+
+
+/**
+ * Class for starting the Jetty server directly, suitable for use in an IDE.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Start
+{
+    private static Log log = LogFactory.getLog( Start.class );
+
+
+    /**
+     * Creates a new instance of Start.
+     */
+    Start()
+    {
+        super();
+    }
+
+
+    /**
+     * Main function, starts the Jetty server.
+     * 
+     * @param args
+     */
+    public static void main( String[] args )
+    {
+        Server jettyServer = null;
+        try
+        {
+            URL jettyConfig = new URL( "file:src/main/resources/jetty-config.xml" );
+            if ( jettyConfig == null )
+            {
+                log.fatal( "Unable to locate jetty-test-config.xml on the classpath" );
+            }
+            jettyServer = new Server( jettyConfig );
+            jettyServer.start();
+        }
+        catch ( Exception e )
+        {
+            log.fatal( "Could not start the Jetty server: " + e );
+            if ( jettyServer != null )
+            {
+                try
+                {
+                    jettyServer.stop();
+                }
+                catch ( InterruptedException e1 )
+                {
+                    log.fatal( "Unable to stop the jetty server: " + e1 );
+                }
+            }
+        }
+    }
+}

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/java/org/apache/directory/server/spnego/Start.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/main/resources/jetty-config.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/main/resources/jetty-config.xml?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/main/resources/jetty-config.xml (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/main/resources/jetty-config.xml Fri Jun  8 19:34:52 2007
@@ -0,0 +1,53 @@
+<?xml version="1.0"  encoding="ISO-8859-1"?>
+<!DOCTYPE Configure PUBLIC  
+ "-//Mort Bay Consulting//DTD Configure 1.1//EN"
+ "http://jetty.mortbay.org/configure_1_2.dtd">
+<!-- =============================================================== -->
+<!-- Configure the Jetty Server                                      -->
+<!-- =============================================================== -->
+<Configure class="org.mortbay.jetty.Server">
+
+  <!-- =============================================================== -->
+  <!-- Configure the Request Listeners                                 -->
+  <!-- =============================================================== -->
+
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  <!-- Add and configure a HTTP listener to port 8080                  -->
+  <!-- The default port can be changed using: java -Djetty.port=80     -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  <Call name="addListener">
+    <Arg>
+      <New class="org.mortbay.http.SocketListener">
+        <Set name="Port"><SystemProperty name="jetty.port" default="8080"/></Set>
+        <Set name="MinThreads">10</Set>
+        <Set name="MaxThreads">100</Set>
+        <Set name="MaxIdleTimeMs">30000</Set>
+        <Set name="LowResourcePersistTimeMs">5000</Set>
+        <Set name="ConfidentialPort">8443</Set>
+        <Set name="IntegralPort">8443</Set>
+      </New>
+    </Arg>
+  </Call>
+
+  <!-- =============================================================== -->
+  <!-- Configure the Contexts                                          -->
+  <!-- =============================================================== -->
+  
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  <!-- Add and configure a specific web application                    -->
+  <!-- + Set Unpack WAR files                                          -->
+  <!-- + Set Default Descriptor.  Resource, file or URL                -->
+  <!-- + Set Virtual Hosts. A Null host or empty array means all hosts -->
+  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+  <Call name="addWebApplication">
+    <Arg>/spnego</Arg>
+    <Arg>src/webapp</Arg>
+  </Call>
+
+  <!-- =============================================================== -->
+  <!-- Configure the Other Server Options                              -->
+  <!-- =============================================================== -->
+  <Set name="requestsPerGC">2000</Set>
+  <Set name="statsOn">false</Set>
+
+</Configure>

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/main/resources/jetty-config.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/webapp/WEB-INF/web.xml?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/webapp/WEB-INF/web.xml (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/webapp/WEB-INF/web.xml Fri Jun  8 19:34:52 2007
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+      "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+    <display-name>Spnego Example</display-name>
+
+ <!--  
+      There are three means to configure Wickets configuration mode and they are
+      tested in the order given. 
+      1) A system property: -Dwicket.configuration
+      2) servlet specific <init-param>
+      3) context specific <context-param>
+      The value might be either "development" (reloading when templates change)
+      or "deployment". If no configuration is found, "deployment" is the default.
+-->
+	<context-param>
+	  <param-name>configuration</param-name>
+	  <param-value>development</param-value>
+	</context-param>
+ 
+    <servlet>
+        <servlet-name>spnego</servlet-name>
+        <servlet-class>wicket.protocol.http.WicketServlet</servlet-class>
+        <init-param>
+          <param-name>applicationClassName</param-name>
+          <param-value>org.apache.directory.server.spnego.SpnegoApplication</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>spnego</servlet-name>
+        <url-pattern>/app/*</url-pattern>
+    </servlet-mapping>
+
+</web-app>

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/kerberos-spnego/src/webapp/index.html
URL: http://svn.apache.org/viewvc/directory/sandbox/erodriguez/kerberos-spnego/src/webapp/index.html?view=auto&rev=545684
==============================================================================
--- directory/sandbox/erodriguez/kerberos-spnego/src/webapp/index.html (added)
+++ directory/sandbox/erodriguez/kerberos-spnego/src/webapp/index.html Fri Jun  8 19:34:52 2007
@@ -0,0 +1,5 @@
+<html>
+<head>
+	<meta http-equiv="Refresh" content="0; url=app">
+</head>
+</html>

Propchange: directory/sandbox/erodriguez/kerberos-spnego/src/webapp/index.html
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message