@Override
    public Map<String, String> getSecurityQuestions(final PasswordManagementQuery query) {
        val results = new LinkedHashMap<String, String>(0);
        findEntries(CollectionUtils.wrap(query.getUsername()))
            .forEach((entry, ldap) -> {
                LOGGER.debug("Located LDAP entry [{}] in the response", entry);
                val questionsAndAnswers = ldap.getSecurityQuestionsAttributes();
                LOGGER.debug("Security question attributes are defined to be [{}]", questionsAndAnswers);

                questionsAndAnswers.forEach((key, value) -> {
                    val questionAndAnswer = getSecurityQuestionAndAnswer(entry, ldap, key, value);
                    val question = questionAndAnswer.getKey();
                    val answer = questionAndAnswer.getValue();

                    if (StringUtils.isNotBlank(question) && StringUtils.isNotBlank(answer)) {
                        LOGGER.debug("Added security question [{}] with answer [{}]", question, answer);
                        results.put(question, answer);
                    }
                });
            });
        return results;
    }
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