jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1394400 - /jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java
Date Fri, 05 Oct 2012 07:55:06 GMT
Author: angela
Date: Fri Oct  5 07:55:05 2012
New Revision: 1394400

URL: http://svn.apache.org/viewvc?rev=1394400&view=rev
Log:
 OAK-91 - Implement Authentication Support (WIP)

Modified:
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java?rev=1394400&r1=1394399&r2=1394400&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java Fri
Oct  5 07:55:05 2012
@@ -16,12 +16,9 @@
  */
 package org.apache.jackrabbit.oak.run;
 
-import static org.apache.jackrabbit.oak.spi.query.IndexUtils.DEFAULT_INDEX_HOME;
-
 import java.io.InputStream;
 import java.util.Properties;
 import java.util.concurrent.Executors;
-
 import javax.jcr.Repository;
 
 import org.apache.jackrabbit.mk.api.MicroKernel;
@@ -44,12 +41,16 @@ import org.apache.jackrabbit.oak.spi.com
 import org.apache.jackrabbit.oak.spi.commit.CompositeValidatorProvider;
 import org.apache.jackrabbit.oak.spi.commit.ValidatingHook;
 import org.apache.jackrabbit.oak.spi.commit.ValidatorProvider;
+import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
+import org.apache.jackrabbit.oak.spi.security.SecurityProvider;
 import org.apache.jackrabbit.webdav.jcr.JCRWebdavServerServlet;
 import org.apache.jackrabbit.webdav.simple.SimpleWebdavServlet;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
 
+import static org.apache.jackrabbit.oak.spi.query.IndexUtils.DEFAULT_INDEX_HOME;
+
 public class Main {
 
     public static final int PORT = 8080;
@@ -155,8 +156,11 @@ public class Main {
         }
 
         private void addServlets(MicroKernel kernel, String path) {
+            // TODO: review usage of opensecurity provider (using default will cause BasicServerTest
to fail. usage of a:a credentials)
+            SecurityProvider securityProvider = new OpenSecurityProvider();
             ContentRepository repository = new Oak(kernel)
                 .with(buildDefaultCommitHook())
+                .with(securityProvider)
                 .createContentRepository();
 
             ServletHolder oak =
@@ -164,7 +168,7 @@ public class Main {
             context.addServlet(oak, path + "/*");
 
             final Repository jcrRepository = new RepositoryImpl(
-                    repository, Executors.newScheduledThreadPool(1), null); // TODO: pass
securityprovider
+                    repository, Executors.newScheduledThreadPool(1), securityProvider);
 
             ServletHolder webdav =
                     new ServletHolder(new SimpleWebdavServlet() {



Mime
View raw message