Sample code for moving the account to the deleted/archived container in the LDAP connector

Thanks for taking the time to make the contribution!

One thing I’d like to suggest is grabbing the account, url, ports and passwords from your application definition. That way we don’t have to store credentials in clear text. This also allows your rule to be not environment specific.

So instead of:
environment.put(Context.SECURITY_CREDENTIALS, "XXXXasdasdXXa*YAb");

using:
environment.put(Context.SECURITY_CREDENTIALS, context.decrypt(application.getAttributeValue("password")));

3 Likes