@Override
    protected void processIQ(IQ packet) throws UnauthorizedException {
        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;
        }
        // Keep track of the component that sent an IQ get/set
        if (packet.getType() == IQ.Type.get || packet.getType() == IQ.Type.set) {
            // Handle subsequent bind packets
            LocalComponentSession componentSession = (LocalComponentSession) session;
            // Get the external component of this session
            LocalComponentSession.LocalExternalComponent component =
                    (LocalComponentSession.LocalExternalComponent) componentSession.getExternalComponent();
            component.track(packet);
        }
        super.processIQ(packet);
    }
Handler of XML stanzas sent by external components connected directly to the server. Received packet will
have their FROM attribute overridden to avoid spoofing.<p>

This is an implementation of the XEP-114.

@author Gaston Dombiak
xmppserver/src/main/java/org/jivesoftware/openfire/net/ComponentStanzaHandler.java