protected Pair<String, String> getSecurityQuestionAndAnswer(
        final LdapEntry entry,
        final LdapPasswordManagementProperties properties,
        final String questionAttributeName,
        final String answerAttributeName) {
        val questionAttribute = entry.getAttribute(questionAttributeName);
        val answerAttribute = entry.getAttribute(answerAttributeName);

        val question = Optional.ofNullable(questionAttribute)
            .map(LdapAttribute::getStringValue)
            .orElse(StringUtils.EMPTY);

        val answer = Optional.ofNullable(answerAttribute)
            .map(LdapAttribute::getStringValue)
            .orElse(StringUtils.EMPTY);

        return Pair.of(question, answer);
    }
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