@Override
    public boolean changeInternal(final PasswordChangeRequest bean) {
        return FunctionUtils.doAndHandle(() -> {
            val results = findEntries(CollectionUtils.wrap(bean.getUsername()))
                .entrySet()
                .stream()
                .map(entry -> {
                    val dn = entry.getKey().getDn();
                    LOGGER.debug("Updating account password for [{}]", dn);
                    val ldapConnectionFactory = new LdapConnectionFactory(connectionFactoryMap.get(entry.getValue().getLdapUrl()));
                    if (ldapConnectionFactory.executePasswordModifyOperation(dn, bean.getCurrentPassword(),
                        bean.getPassword(), entry.getValue().getType())) {
                        LOGGER.debug("Successfully updated the account password for [{}]", dn);
                        return Boolean.TRUE;
                    }
                    LOGGER.error("Could not update the LDAP entry's password for [{}]", dn);
                    return Boolean.FALSE;
                }).toList();
            return results.stream().allMatch(result -> result);
        }, e -> false).get();
    }
This is {@link LdapPasswordManagementService}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-pm-ldap/src/main/java/org/apereo/cas/pm/LdapPasswordManagementService.java