jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r294806 - in /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: RepositoryImpl.java security/AuthContext.java
Date Tue, 04 Oct 2005 16:02:58 GMT
Author: jukka
Date: Tue Oct  4 09:02:45 2005
New Revision: 294806

URL: http://svn.apache.org/viewcvs?rev=294806&view=rev
Log:
Moved LoginModule instantiation up to RepositoryImpl to break the AuthContext -> o.a.j.core.config
dependency.

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/security/AuthContext.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=294806&r1=294805&r2=294806&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java Tue
Oct  4 09:02:45 2005
@@ -884,7 +884,8 @@
             if (lmc == null) {
                 authCtx = new AuthContext.JAAS(repConfig.getAppName(), credentials);
             } else {
-                authCtx = new AuthContext.Local(lmc, credentials);
+                authCtx = new AuthContext.Local(
+                        lmc.getLoginModule(), lmc.getParameters(), credentials);
             }
             authCtx.login();
         } catch (javax.security.auth.login.LoginException le) {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/security/AuthContext.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/security/AuthContext.java?rev=294806&r1=294805&r2=294806&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/security/AuthContext.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/security/AuthContext.java
Tue Oct  4 09:02:45 2005
@@ -16,9 +16,6 @@
  */
 package org.apache.jackrabbit.core.security;
 
-import org.apache.jackrabbit.core.config.ConfigurationException;
-import org.apache.jackrabbit.core.config.LoginModuleConfig;
-
 import javax.jcr.Credentials;
 import javax.security.auth.Subject;
 import javax.security.auth.login.LoginContext;
@@ -34,7 +31,7 @@
  * This class is abstract and has two implementations:
  * <ul>
  *   <li>{@link AuthContext.JAAS} which delegates to a regular JAAS <code>LoginContext</code></li>
- *   <li>{@link AuthCotnext.Local} which implements authentication using a locally-defined
+ *   <li>{@link AuthContext.Local} which implements authentication using a locally-defined
  *       JAAS <code>LoginModule</code></li>
  * </ul>
  *
@@ -118,15 +115,16 @@
         private Credentials creds;
 
         /**
-         * Creates an authentication context given a login module configuration and some
credentials.
+         * Creates an authentication context given a login module and some credentials.
          *
+         * @param module the login module
+         * @param options login module options
          * @param config the login module configuration
          * @param creds the credentials
-         * @throws ConfigurationException if the login module couldn't be created
          */
-        public Local(LoginModuleConfig config, Credentials creds) throws ConfigurationException
{
-            this.module = config.getLoginModule();
-            this.options = config.getParameters();
+        public Local(LoginModule module, Map options, Credentials creds) {
+            this.module = module;
+            this.options = options;
             this.creds = creds;
         }
 



Mime
View raw message