protected LdapAttribute getLdapPasswordAttribute(final UsernamePasswordCredential credential) {
        if ("unicodePwd".equals(ldapProperties.getPasswordAttribute())) {
            return new UnicodePwdAttribute(credential.toPassword());
        }
        val attr = new LdapAttribute(ldapProperties.getPasswordAttribute());
        attr.addStringValues(credential.toPassword());
        return attr;
    }
This is {@link LdapPasswordSynchronizationAuthenticationPostProcessor}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/authentication/LdapPasswordSynchronizationAuthenticationPostProcessor.java