jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r927389 - /jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java
Date Thu, 25 Mar 2010 13:23:21 GMT
Author: angela
Date: Thu Mar 25 13:23:21 2010
New Revision: 927389

URL: http://svn.apache.org/viewvc?rev=927389&view=rev
Log:
allow subclasses to use different credentials provider

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java?rev=927389&r1=927388&r2=927389&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/JCRWebdavServerServlet.java
Thu Mar 25 13:23:21 2010
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.webdav.jcr;
 
 import org.apache.jackrabbit.server.BasicCredentialsProvider;
+import org.apache.jackrabbit.server.CredentialsProvider;
 import org.apache.jackrabbit.server.SessionProviderImpl;
 import org.apache.jackrabbit.server.jcr.JCRWebdavServer;
 import org.apache.jackrabbit.webdav.DavException;
@@ -168,10 +169,7 @@ public abstract class JCRWebdavServerSer
     public DavSessionProvider getDavSessionProvider() {
         if (server == null) {
             Repository repository = getRepository();
-            server = new JCRWebdavServer(repository, new SessionProviderImpl(
-                    new BasicCredentialsProvider(
-                            getInitParameter(INIT_PARAM_MISSING_AUTH_MAPPING)))
-            );
+            server = new JCRWebdavServer(repository, new SessionProviderImpl(getCredentialsProvider()));
         }
         return server;
     }
@@ -311,4 +309,13 @@ public abstract class JCRWebdavServerSer
      * Returns the repository to be used by this servlet.
      */
     protected abstract Repository getRepository();
+
+    /**
+     * Returns a new instanceof <code>BasicCredentialsProvider</code>.
+     *
+     * @return a new credentials provider
+     */
+    protected CredentialsProvider getCredentialsProvider() {
+        return new BasicCredentialsProvider(getInitParameter(INIT_PARAM_MISSING_AUTH_MAPPING));
+    }
 }



Mime
View raw message