jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r530121 - /jackrabbit/branches/1.3/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java
Date Wed, 18 Apr 2007 18:33:48 GMT
Author: jukka
Date: Wed Apr 18 11:33:48 2007
New Revision: 530121

URL: http://svn.apache.org/viewvc?view=rev&rev=530121
Log:
1.3: Merged revision 530119 (JCR-847)

Modified:
    jackrabbit/branches/1.3/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java

Modified: jackrabbit/branches/1.3/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.3/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java?view=diff&rev=530121&r1=530120&r2=530121
==============================================================================
--- jackrabbit/branches/1.3/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java
(original)
+++ jackrabbit/branches/1.3/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java
Wed Apr 18 11:33:48 2007
@@ -18,6 +18,7 @@
 
 import org.apache.jackrabbit.server.AbstractWebdavServlet;
 import org.apache.jackrabbit.server.BasicCredentialsProvider;
+import org.apache.jackrabbit.server.CredentialsProvider;
 import org.apache.jackrabbit.server.SessionProvider;
 import org.apache.jackrabbit.server.SessionProviderImpl;
 import org.apache.jackrabbit.webdav.DavLocatorFactory;
@@ -277,12 +278,23 @@
      */
     public synchronized SessionProvider getSessionProvider() {
         if (sessionProvider == null) {
-            sessionProvider = new SessionProviderImpl(
-                new BasicCredentialsProvider(
-                    getInitParameter(INIT_PARAM_MISSING_AUTH_MAPPING))
-            );
+            sessionProvider = new SessionProviderImpl(getCredentialsProvider());
         }
         return sessionProvider;
+    }
+
+    /**
+     * Factory method for creating the credentials provider to be used for
+     * accessing the credentials associated with a request. The default
+     * implementation returns a {@link BasicCredentialsProvider} instance,
+     * but subclasses can override this method to add support for other
+     * types of credentials.
+     *
+     * @return the credentilas provider
+     * @since 1.3
+     */
+    protected CredentialsProvider getCredentialsProvider() {
+    	return new BasicCredentialsProvider(getInitParameter(INIT_PARAM_MISSING_AUTH_MAPPING));
     }
 
     /**



Mime
View raw message