@Override
    protected void processIQ(final IQ packet) {
        if (!session.isAuthenticated()) {
            // Session is not authenticated so return error
            IQ reply = new IQ();
            reply.setChildElement(packet.getChildElement().createCopy());
            reply.setID(packet.getID());
            reply.setTo(packet.getFrom());
            reply.setFrom(packet.getTo());
            reply.setError(PacketError.Condition.not_authorized);
            session.process(reply);
            return;
        }
        // Process the packet
        packetHandler.handle(packet);
    }
Handler of IQ packets sent from the Connection Manager to the server.
xmppserver/src/main/java/org/jivesoftware/openfire/net/MultiplexerStanzaHandler.java