[jboss-cvs] Picketbox SVN: r391 - trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/spi.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 11 14:38:48 EDT 2013


Author: pskopek at redhat.com
Date: 2013-03-11 14:38:48 -0400 (Mon, 11 Mar 2013)
New Revision: 391

Modified:
   trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/spi/LdapExtLoginModule.java
Log:
[AS7-5737] allowReferralsForAuth option removed as we are not supporting username/password in referrals

Modified: trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/spi/LdapExtLoginModule.java
===================================================================
--- trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/spi/LdapExtLoginModule.java	2013-03-06 08:59:13 UTC (rev 390)
+++ trunk/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/spi/LdapExtLoginModule.java	2013-03-11 18:38:48 UTC (rev 391)
@@ -169,7 +169,6 @@
    private static final String USERNAME_BEGIN_STRING = "usernameBeginString";
    private static final String USERNAME_END_STRING = "usernameEndString";
    private static final String ALLOW_EMPTY_PASSWORDS = "allowEmptyPasswords";
-   private static final String ALLOW_REFERRALS_FOR_AUTH = "allowReferralsForAuth";
    private static final String[] ALL_VALID_OPTIONS =
    {
       ROLES_CTX_DN_OPT,
@@ -192,7 +191,6 @@
       USERNAME_BEGIN_STRING,
       USERNAME_END_STRING,
       ALLOW_EMPTY_PASSWORDS,
-      ALLOW_REFERRALS_FOR_AUTH,
 
       Context.INITIAL_CONTEXT_FACTORY,
       Context.OBJECT_FACTORIES,
@@ -245,8 +243,6 @@
    
    protected String usernameEndString;
    
-   protected boolean allowReferralsForAuth = false;
-
    // simple flag to indicate is the validatePassword method was called
    protected boolean isPasswordValidated = false;
 
@@ -398,7 +394,6 @@
     	  bindCredential = SecurityVaultUtil.getValueAsString(bindCredential);
       }
 
-      allowReferralsForAuth = Boolean.valueOf((String)options.get(ALLOW_REFERRALS_FOR_AUTH)).booleanValue();
       baseDN = (String) options.get(BASE_CTX_DN);
       baseFilter = (String) options.get(BASE_FILTER_OPT);
       roleFilter = (String) options.get(ROLE_FILTER_OPT);
@@ -550,12 +545,7 @@
              userDN = name + ("".equals(baseDN) ? "" : "," + baseDN);
           }
           else {
-             if (allowReferralsForAuth) {
-                userDN = sr.getNameInNamespace();
-             }
-             else {
-                throw PicketBoxMessages.MESSAGES.unableToFollowReferralForAuth(name);
-             }
+             throw PicketBoxMessages.MESSAGES.unableToFollowReferralForAuth(name);
           }
       }
 
@@ -678,9 +668,7 @@
             referralsExist = false;
          }
          catch (ReferralException e) {
-            if (allowReferralsForAuth) {
-               ldapCtx = (LdapContext) e.getReferralContext();
-            }
+            ldapCtx = (LdapContext) e.getReferralContext();
          }
          finally
          {



More information about the jboss-cvs-commits mailing list