add LDIF write attribute order by attribute:value (source control)
| | |
| | | |
| | | final String attributeDescription = attribute.getAttributeDescriptionAsString(); |
| | | if (attribute.isEmpty()) { |
| | | attr.put(attributeDescription+attr.size(), new AbstractMap.SimpleEntry<String,ByteSequence>(attributeDescription,ByteString.empty()) ); |
| | | attr.put(attributeDescription, new AbstractMap.SimpleEntry<String,ByteSequence>(attributeDescription,ByteString.empty()) ); |
| | | } else { |
| | | for (final ByteString value : attribute) { |
| | | attr.put(attributeDescription+attr.size(), new AbstractMap.SimpleEntry<String,ByteSequence>(attributeDescription,value)); |
| | | attr.put(attributeDescription+value, new AbstractMap.SimpleEntry<String,ByteSequence>(attributeDescription,value)); |
| | | } |
| | | } |
| | | } |
| | |
| | | final String[] expected = |
| | | new String[] { "dn: cn=John Doe,ou=people,dc=example,dc=com", |
| | | "cn: John Doe", |
| | | "description: five six", |
| | | "description: one two", |
| | | "description: three four", |
| | | "description: five six", |
| | | "givenName: John", |
| | | "localized;lang-fr:: w6dlZGlsbGE=", |
| | | "objectClass: top", |
| | | "objectClass: person", |
| | | "objectClass: inetOrgPerson", |
| | | "objectClass: person", |
| | | "objectClass: top", |
| | | "sn: Doe", |
| | | "typeOnly: ", |
| | | |
| | |
| | | coretokenobject: {"redirectURI":["http://fake.com"],"acr":[],"clientID":["clientOIDC"],"lineFoldingTest":["This line should have been correctly folded"],"tokenName":["refresh_token"],"authModules":["LDAP"],"realm":["/myrealm"],"id":["fakeid"],"userName":["johndoe"],"tokenType":["Bearer"]} |
| | | coretokenstring07: Bearer |
| | | coretokenstring08: /myrealm |
| | | objectClass: top |
| | | objectClass: frCoreToken |
| | | objectClass: top |
| | | |
| | |
| | | id"],"userName":["johndoe"],"tokenType":["Bearer"]} |
| | | coretokenstring07: Bearer |
| | | coretokenstring08: /myrealm |
| | | objectClass: top |
| | | objectClass: frCoreToken |
| | | objectClass: top |
| | | |
| | |
| | | dn: dc=example,dc=com |
| | | dc: example |
| | | objectClass: top |
| | | objectClass: domain |
| | | objectClass: top |
| | | |