@Override
    public Iterator<Element> getIdentities(String name, String node, JID senderJID) {
        JID recipientJID = XMPPServer.getInstance().createJID(name, null, true).asBareJID();
        PEPService pepService = pepServiceManager.getPEPService(recipientJID);

        if (node != null && pepService != null) {
            Node pubNode = pepService.getNode(node);
            if (pubNode == null) return null;
            // Answer the identity of a given node
            Element identity = DocumentHelper.createElement("identity");
            identity.addAttribute("category", "pubsub");
            identity.addAttribute("type", pubNode.isCollectionNode() ? "collection" : "leaf");

            List<Element> identities = new LinkedList<>();
            identities.add(identity);
            return identities.iterator();
        } else if (node != null) {
            return null;
        } else {
            PubSubModule pubsub = XMPPServer.getInstance().getPubSubModule();
            return pubsub.getIdentities(null, null, senderJID);
        }
    }
The following functions are unimplemented required interface methods.
xmppserver/src/main/java/org/jivesoftware/openfire/pep/IQPEPHandler.java