@Override
    public Collection<String> getImpersonationAccounts(final String username, final Optional<? extends Service> service) {
        val surrogateAccountQuery = SpringExpressionLanguageValueResolver.getInstance()
            .resolve(casProperties.getAuthn().getSurrogate().getJdbc().getSurrogateAccountQuery());
        val results = jdbcTemplate.query(surrogateAccountQuery, new BeanPropertyRowMapper<>(SurrogateAccount.class), username);
        return results.parallelStream().map(SurrogateAccount::getSurrogateAccount).collect(Collectors.toList());
    }
This is {@link SurrogateJdbcAuthenticationService}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-surrogate-authentication-jdbc/src/main/java/org/apereo/cas/authentication/surrogate/SurrogateJdbcAuthenticationService.java