@Override
    public String findUsername(final PasswordManagementQuery query) {
        val result = jsonBackedAccounts.entrySet()
            .stream()
            .filter(entry -> entry.getValue().getEmail().equalsIgnoreCase(query.getEmail()))
            .findFirst();
        return result.map(Map.Entry::getKey).orElse(null);
    }
This is {@link JsonResourcePasswordManagementService}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-pm-core/src/main/java/org/apereo/cas/pm/impl/JsonResourcePasswordManagementService.java