public final class LDAPUtil extends Object
Utility class for LDAP-related code.
| Constructor and Description |
|---|
LDAPUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
convertObjectGUIToByteString(byte[] objectGUID)
Creates a byte-based
String representation of a raw byte array representing the value of the
objectGUID attribute retrieved from Active Directory. |
static String |
decodeObjectGUID(byte[] objectGUID)
Decode a raw byte array representing the value of the
objectGUID attribute retrieved from Active
Directory. |
public static String convertObjectGUIToByteString(byte[] objectGUID)
Creates a byte-based String representation of a raw byte array representing the value of the
objectGUID attribute retrieved from Active Directory.
The returned string is useful to perform queries on AD based on the objectGUID value. Eg.:
String filter = "(&(objectClass=*)(objectGUID" + EQUAL + convertObjectGUIToByteString(objectGUID) + "))";
objectGUID - A raw byte array representing the value of the objectGUID attribute retrieved from
Active Directory.public static String decodeObjectGUID(byte[] objectGUID)
Decode a raw byte array representing the value of the objectGUID attribute retrieved from Active
Directory.
The returned string is useful to directly bind an entry. Eg.:
String bindingString = decodeObjectGUID(objectGUID);
Attributes attributes = ctx.getAttributes(bindingString);
objectGUID - A raw byte array representing the value of the objectGUID attribute retrieved from
Active Directory.Copyright © 2018 JBoss by Red Hat. All rights reserved.