geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r404878 - /geronimo/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java
Date Mon, 08 May 2006 00:12:02 GMT
Author: djencks
Date: Sun May  7 17:12:00 2006
New Revision: 404878

URL: http://svn.apache.org/viewcvs?rev=404878&view=rev
Log:
GERONIMO-1975 trim everything in security builder

Modified:
    geronimo/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java

Modified: geronimo/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java?rev=404878&r1=404877&r2=404878&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java
(original)
+++ geronimo/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java
Sun May  7 17:12:00 2006
@@ -50,7 +50,7 @@
 
 
 /**
- * @version $Rev: 384667 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class SecurityBuilder {
 
@@ -184,7 +184,7 @@
                 for (int j = 0; j < roleType.sizeOfDistinguishedNameArray(); j++) {
                     GerDistinguishedNameType dnType = roleType.getDistinguishedNameArray(j);
 
-                    role.getDistinguishedNames().add(new DistinguishedName(dnType.getName(),
dnType.getDesignatedRunAs()));
+                    role.getDistinguishedNames().add(new DistinguishedName(dnType.getName().trim(),
dnType.getDesignatedRunAs()));
                 }
 
                 security.getRoleMappings().put(roleName, role);
@@ -206,7 +206,7 @@
             Set defaultCredentialSet = new HashSet();
             for (int i = 0; i < namedCredentials.length; i++) {
                 GerNamedUsernamePasswordCredentialType namedCredentialType = namedCredentials[i];
-                NamedUsernamePasswordCredential namedCredential = new NamedUsernamePasswordCredential(namedCredentialType.getUsername(),
namedCredentialType.getPassword().toCharArray(), namedCredentialType.getName());
+                NamedUsernamePasswordCredential namedCredential = new NamedUsernamePasswordCredential(namedCredentialType.getUsername().trim(),
namedCredentialType.getPassword().trim().toCharArray(), namedCredentialType.getName().trim());
                 defaultCredentialSet.add(namedCredential);
             }
             defaultPrincipal.setNamedUserPasswordCredentials(defaultCredentialSet);
@@ -216,15 +216,15 @@
 
     //used from TSSConfigEditor
     public static RealmPrincipalInfo buildRealmPrincipal(GerRealmPrincipalType realmPrincipalType)
{
-        return new RealmPrincipalInfo(realmPrincipalType.getDomainName(), realmPrincipalType.getRealmName(),
realmPrincipalType.getClass1(), realmPrincipalType.getName(), realmPrincipalType.isSetDesignatedRunAs());
+        return new RealmPrincipalInfo(realmPrincipalType.getDomainName().trim(), realmPrincipalType.getRealmName().trim(),
realmPrincipalType.getClass1().trim(), realmPrincipalType.getName().trim(), realmPrincipalType.isSetDesignatedRunAs());
     }
 
     public static LoginDomainPrincipalInfo buildDomainPrincipal(GerLoginDomainPrincipalType
domainPrincipalType) {
-        return new LoginDomainPrincipalInfo(domainPrincipalType.getDomainName(), domainPrincipalType.getClass1(),
domainPrincipalType.getName(), domainPrincipalType.isSetDesignatedRunAs());
+        return new LoginDomainPrincipalInfo(domainPrincipalType.getDomainName().trim(), domainPrincipalType.getClass1().trim(),
domainPrincipalType.getName().trim(), domainPrincipalType.isSetDesignatedRunAs());
     }
 
     public static PrincipalInfo buildPrincipal(GerPrincipalType principalType) {
-        return new PrincipalInfo(principalType.getClass1(), principalType.getName(), principalType.isSetDesignatedRunAs());
+        return new PrincipalInfo(principalType.getClass1().trim(), principalType.getName().trim(),
principalType.isSetDesignatedRunAs());
     }
 
     public static GBeanData configureApplicationPolicyManager(Naming naming, AbstractName
moduleName, Map contextIDToPermissionsMap, SecurityConfiguration securityConfiguration) {



Mime
View raw message