[jboss-cvs] JBossAS SVN: r112540 - projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Dec 22 11:59:53 EST 2011


Author: tfonteyn
Date: 2011-12-22 11:59:52 -0500 (Thu, 22 Dec 2011)
New Revision: 112540

Modified:
   projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/DatabaseServerLoginModule.java
   projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/LdapExtLoginModule.java
   projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/RoleMappingLoginModule.java
Log:
[JBAPP-7794] minor corrections that were missed in take 1

Modified: projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/DatabaseServerLoginModule.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/DatabaseServerLoginModule.java	2011-12-22 14:52:23 UTC (rev 112539)
+++ projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/DatabaseServerLoginModule.java	2011-12-22 16:59:52 UTC (rev 112540)
@@ -132,9 +132,11 @@
       {
          log.trace("DatabaseServerLoginModule, dsJndiName="+dsJndiName);
          log.trace("principalsQuery="+principalsQuery);
-         log.trace("rolesQuery="+rolesQuery);
+         if (rolesQuery != null)
+            log.trace("rolesQuery="+rolesQuery);
          log.trace("suspendResume="+suspendResume);
-         log.trace("transactionManagerJndiName="+jname);
+         if(jname != null)
+            log.trace("transactionManagerJndiName="+jname);
       }
 
       try

Modified: projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/LdapExtLoginModule.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/LdapExtLoginModule.java	2011-12-22 14:52:23 UTC (rev 112539)
+++ projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/LdapExtLoginModule.java	2011-12-22 16:59:52 UTC (rev 112540)
@@ -179,15 +179,18 @@
    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[] ALL_VALID_OPTIONS =
    {
-	   ROLES_CTX_DN_OPT,ROLE_ATTRIBUTE_ID_OPT,ROLE_ATTRIBUTE_ID_OPT,
+	   ROLES_CTX_DN_OPT,ROLE_ATTRIBUTE_ID_OPT,
 	   ROLE_NAME_ATTRIBUTE_ID_OPT,PARSE_ROLE_NAME_FROM_DN_OPT,
 	   BIND_DN,BIND_CREDENTIAL,BASE_CTX_DN,BASE_FILTER_OPT,
 	   ROLE_FILTER_OPT,ROLE_RECURSION,DEFAULT_ROLE,
 	   SEARCH_TIME_LIMIT_OPT,SEARCH_SCOPE_OPT,SECURITY_DOMAIN_OPT,
 	   DISTINGUISHED_NAME_ATTRIBUTE_OPT,PARSE_USERNAME,USERNAME_BEGIN_STRING,USERNAME_END_STRING,
+           ALLOW_EMPTY_PASSWORDS,
 	   
 	   Context.INITIAL_CONTEXT_FACTORY,Context.SECURITY_AUTHENTICATION,Context.SECURITY_PROTOCOL,
 	   Context.PROVIDER_URL,Context.SECURITY_PRINCIPAL,Context.SECURITY_CREDENTIALS
@@ -304,7 +307,7 @@
          {
             // Check for an allowEmptyPasswords option
             boolean allowEmptyPasswords = true;
-            String flag = (String) options.get("allowEmptyPasswords");
+            String flag = (String) options.get(ALLOW_EMPTY_PASSWORDS);
             if (flag != null)
                allowEmptyPasswords = Boolean.valueOf(flag).booleanValue();
             if (allowEmptyPasswords == false)

Modified: projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/RoleMappingLoginModule.java
===================================================================
--- projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/RoleMappingLoginModule.java	2011-12-22 14:52:23 UTC (rev 112539)
+++ projects/security/security-jboss-sx/branches/Branch_2_0/jbosssx/src/main/java/org/jboss/security/auth/spi/RoleMappingLoginModule.java	2011-12-22 16:59:52 UTC (rev 112540)
@@ -52,12 +52,12 @@
  */
 public class RoleMappingLoginModule extends AbstractServerLoginModule
 {   
-   private static final String REPlACE_ROLE = "replaceRole";
+   private static final String REPLACE_ROLE_OPT = "replaceRole";
    private static final String ROLES_PROPERTIES = "rolesProperties";
 
    private static final String[] ALL_VALID_OPTIONS =
    {
-	   REPlACE_ROLE,ROLES_PROPERTIES
+	   REPLACE_ROLE_OPT,ROLES_PROPERTIES
    };
    
    private static Logger log = Logger.getLogger(RoleMappingLoginModule.class);
@@ -109,7 +109,7 @@
     */
    protected Group[] getRoleSets() throws LoginException
    { 
-      String rep = (String)options.get(REPlACE_ROLE);
+      String rep = (String)options.get(REPLACE_ROLE_OPT);
       if("true".equalsIgnoreCase(rep))
          this.REPLACE_ROLE = true;
       



More information about the jboss-cvs-commits mailing list