@Override
    public Map<String, String> getSecurityQuestions(final PasswordManagementQuery query) {
        return this.transactionTemplate.execute(action -> {
            val sqlSecurityQuestions = casProperties.getAuthn().getPm().getJdbc().getSqlGetSecurityQuestions();
            val map = new HashMap<String, String>();
            val results = jdbcTemplate.queryForList(sqlSecurityQuestions, query.getUsername());
            results.forEach(row -> {
                if (row.containsKey("question") && row.containsKey("answer")) {
                    map.put(row.get("question").toString(), row.get("answer").toString());
                }
            });
            LOGGER.debug("Found [{}] security questions for [{}]", map.size(), query.getUsername());
            return map;
        });
    }
This is {@link JdbcPasswordManagementService}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-pm-jdbc/src/main/java/org/apereo/cas/pm/jdbc/JdbcPasswordManagementService.java