LDAPClient difference wtih IVIA
Differences between the LDAP classes and traditional Verify Identity Access LDAP classes
Input argument and return value type differences
1. List type
JS array is used instead of java.util.List.
- Input argument: use JavaScript array to create the variable.
var attrUtil = new LdapAttributeUtil("ldap");
// getAttributeValue
let attrList = ["objectClass", "description"]
let result = attrUtil.getAttributeValue("ou=newOu", attrList);
// do something
- Return value: access the return values as JavaScript array
var userLookupHelper = new UserLookupHelper("ldap");
let results = userLookupHelper.search("givenName", "Scott", 5);
if (results != null) {
for (let i = 0; i < results.length; i++) {
let result = results[i];
// Do something...
}
}
2. Map type
JS object is used instead of java.util.Map
- Input argument: use JavaScript object to create the variable.
var attrUtil = new LdapAttributeUtil("ldap");
// createSubContext
let attrMap = {"objectClass": ["top", "organizationalUnit"]}
let result = attrUtil.createSubContext("ou=newOu", attrMap);
// do something
3. LdapOperationResult and subtypes
LdapAttributeUtil methods use LdapAttributeResult as the return type instead of using subtype classes of com.ibm.security.access.ldap.LdapOperationResult.
- Return value: LDAP classes do not have Map type return value
API differences
1. UserLookupHelper vs com.ibm.security.access.user.UserLookupHelper
UserLookupHelper vs com.ibm.security.access.user.UserLookupHelper- Constructors:
UserLookupHelpertakes in one argument, which indicate which ldap configuration to use. If it's not specified, the default configuration nameldapwill be used.
Refer to storage configure guide for ldap configuration. - Supported methods: Uses same input arguments as
com.ibm.security.access.user.UserLookupHelpergetUsergetUserByNativeId
- Supported but incompatible methods: The following methods from
com.ibm.security.access.user.UserLookupHelperare functionally supported byUserLookupHelper, but incompatible to the original method due to input arguments differences.createUser: The signatures are different.deleteUser: Supports the first argumentusernameonly. TheremoveNativeUserargument is ignored if provided.init: Tests the ldap connection only, does not perform ldap initialization. Returnstrueif the test connection succeeded, otherwise returnsfalse. Refer toUserLookupHelperConstructors to connect different ldap.isReady: Test the ldap connection. Returnstrueif the test connection succeeded, otherwise returnsfalsesearch: Supports the first three argumentssearchAttr,attrPattern, andmaxReturnedonly. ThepageSizeargument is ignored if provided.
- Unsupported methods:
shutdown
2. User compared to com.ibm.security.access.user.User
User compared to com.ibm.security.access.user.User- Constructors: Not applicable
- Supported methods: Uses same input arguments as
com.ibm.security.access.user.User.
Also, refer to Input Argument and Return Value Type Differences for return type differencesauthenticategetIdgetNativeIdgetAttributeNamesgetAttributegetAttributesgetErrMessageattributeExists
- Unsupported methods:
addAttributeaddToGroupchangePasswordclearErrorgetGroupsgetNativeGroupsisAccountDisabledisAccountLockedisAccountValidisCredentialsValidisPasswordCharsValidisPasswordContainsRepeatedCharsisPasswordContainsSpacesisPasswordExpiringSoonisPasswordMissingAlphaCharsisPasswordMissingNonAlphaCharsisPasswordTooShortisPasswordValidisValidTimeOfDayAccessremoveAttributeremoveFromGroupreplaceAttributsetPasswordwasAccountJustDisabledwasAccountJustLockedwasOldPasswordValid
- New methods:
Userprovides these new methodshasErrorgetError
3. LdapAttributeUtil vs com.ibm.security.access.ldap.utils.AttributeUtil
LdapAttributeUtil vs com.ibm.security.access.ldap.utils.AttributeUtil- Constructors:
LdapAttributeUtiltakes in one argument, which indicate which ldap configuration to use. If it's not specified, the default configuration nameldapwill be used.
Refer to storage configure guide for ldap configuration. - Supported methods: Uses same input arguments as
com.ibm.security.access.ldap.utils.AttributeUtiladdAttributeValuegetAttributeValueremoveAttributesearchsetAttributeValue
- Supported but incompatible methods: The following methods from
com.ibm.security.access.ldap.utils.AttributeUtilare functionally supported byLdapAttributeUtil, but incompatible to the original method due to input arguments differencescreateSubContext: The type of second argumentattributesis JavaScript Object instead ofjavax.naming.directory.Attributesinit: Tests the ldap connection only, it does not perform ldap initialization.- Use
hasErrororisSuccessfulon the returnedLdapAttributeResultinstance to check whether the test connection succeeded. - Use
getErrororgetNamingExceptionon the returnedLdapAttributeResultinstance to retrieve the error details.
Refer toLdapAttributeUtilConstructors to connect different ldap
- Use
- Unsupported methods:
ldapAttributeGetResultToAttributeGetResult
4. LdapAttributeResult compared to com.ibm.security.access.ldap.LdapOperationResult and its subtypes
LdapAttributeResult compared to com.ibm.security.access.ldap.LdapOperationResult and its subtypes- Constructors: Not applicable
- Supported methods:
isSuccessfulgetNamingExceptiongetAttributesgetNamingEnumeration
- Unsupported methods: The following methods from
com.ibm.security.access.ldap.LdapOperationResultand its subtypes are NOT supported byLdapAttributeResultgetResponseControlstoStringgetCreatedContext
- New methods:
LdapAttributeResultprovides these new methodshasErrorgetError
5. Attributes compared to javax.naming.directory.Attributes
Attributes compared to javax.naming.directory.Attributes- Constructors: Not to be instantiated by the user
- Supported methods: Uses same input arguments as
javax.naming.directory.AttributesgetgetIDsgetAllisCaseIgnoredsize
- Unsupported methods:
cloneputremove
6. Attribute compared to javax.naming.directory.Attribute
Attribute compared to javax.naming.directory.Attribute- Constructors: Not to be instantiated by the user
- Supported methods: Uses same input arguments as
javax.naming.directory.AttributecontainsisOrderedsizegetIDgetgetAll
- Unsupported methods:
cloneaddclearremoveset
7. SearchResult compared to javax.naming.directory.SearchResult
SearchResult compared to javax.naming.directory.SearchResult- Constructors: Not to be instantiated by the user
- Supported methods: Uses same input arguments as
javax.naming.directory.SearchResultgetAttributesgetName
- Unsupported methods:
setAttributestoString
8. NamingEnumeration compared to javax.naming.NamingEnumeration
NamingEnumeration compared to javax.naming.NamingEnumeration- Constructors: Not to be instantiated by the user
- Supported methods: Uses same input arguments as
javax.naming.NamingEnumerationhasMorenext
- Unsupported methods:
close
Updated 12 months ago
