jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1466999 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ConfigurationUtil.java
Date Thu, 11 Apr 2013 17:44:29 GMT
Author: angela
Date: Thu Apr 11 17:44:28 2013
New Revision: 1466999

URL: http://svn.apache.org/r1466999
Log:
javadoc

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ConfigurationUtil.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ConfigurationUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ConfigurationUtil.java?rev=1466999&r1=1466998&r2=1466999&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ConfigurationUtil.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ConfigurationUtil.java
Thu Apr 11 17:44:28 2013
@@ -26,13 +26,20 @@ import org.apache.jackrabbit.oak.securit
 import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
 
 /**
- * ConfigurationUtil... TODO
+ * Utility to create {@link Configuration}s for built-in LoginModule implementations.
  */
 public final class ConfigurationUtil {
 
     private ConfigurationUtil() {
     }
 
+    /**
+     * Creates a new {@link Configuration} for the default OAK authentication
+     * setup which only handles login for standard JCR credentials.
+     *
+     * @param loginConfiguration The configuration parameters.
+     * @return A new {@code Configuration}
+     */
     public static Configuration getDefaultConfiguration(final ConfigurationParameters loginConfiguration)
{
         return new Configuration() {
             @Override
@@ -43,12 +50,26 @@ public final class ConfigurationUtil {
         };
     }
 
+    /**
+     * Creates a new {@link Configuration} backwards compatible with the default
+     * Jackrabbit 2.x authentication setup. In addition to login with standard JCR
+     * credentials this configuration also handles
+     * {@link org.apache.jackrabbit.api.security.authentication.token.TokenCredentials}
+     * and under certain circumstances treats login without credentials as
+     * anonymous login.
+     *
+     * @param loginConfiguration The configuration parameters.
+     * @return A new {@code Configuration}
+     */
     public static Configuration getJackrabbit2Configuration(final ConfigurationParameters
loginConfiguration) {
         return new Configuration() {
             @Override
             public AppConfigurationEntry[] getAppConfigurationEntry(String applicationName)
{
                 Map<String, ?> options = loginConfiguration.getConfigValue(applicationName,
Collections.<String, Object>emptyMap());
-                return new AppConfigurationEntry[]{new GuestEntry(options), new TokenEntry(options),
new DefaultEntry(options)};
+                return new AppConfigurationEntry[]{
+                        new GuestEntry(options),
+                        new TokenEntry(options),
+                        new DefaultEntry(options)};
             }
         };
     }



Mime
View raw message