Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[cfid-368] Preserve case of username in ScimUser

[Fixes #40593105] [cfid-368] username should preserve case

Change-Id: I76d6b3179f510538ee190ff1e72c9879d73e8d0a
  • Loading branch information...
commit cb7e2f392e9fc38fbe2f1b77b6776f55a60a7a06 1 parent 8b26438
@dsyer dsyer authored
View
14 common/src/main/java/org/cloudfoundry/identity/uaa/scim/ScimUser.java
@@ -12,17 +12,17 @@
*/
package org.cloudfoundry.identity.uaa.scim;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.springframework.util.Assert;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.springframework.util.Assert;
+
/**
* Object to hold SCIM data for Jackson to map to and from JSON
*
@@ -287,7 +287,7 @@ public ScimUser() { }
public ScimUser(String id, String userName, String givenName, String familyName) {
super(id);
- setUserName(userName);
+ this.userName = userName;
this.name = new Name(givenName, familyName);
}
@@ -304,7 +304,7 @@ public void setPassword(String password) {
}
public void setUserName(String userName) {
- this.userName = userName.toLowerCase();
+ this.userName = userName;
}
public Name getName() {
View
2  common/src/test/java/org/cloudfoundry/identity/uaa/scim/jdbc/JdbcScimUserProvisioningTests.java
@@ -131,7 +131,7 @@ public void canCreateUser() {
ScimUser user = new ScimUser(null, "JO@FOO.COM", "Jo", "User");
user.addEmail("jo@blah.com");
ScimUser created = db.createUser(user, "j7hyqpassX");
- assertEquals("jo@foo.com", created.getUserName());
+ assertEquals("JO@FOO.COM", created.getUserName());
assertNotNull(created.getId());
assertNotSame(user.getId(), created.getId());
Map<String, Object> map = template.queryForMap("select * from users where id=?", created.getId());
Please sign in to comment.
Something went wrong with that request. Please try again.