@Override
    protected void processMessage(Message packet) throws UnauthorizedException {
        if (!session.isAuthenticated()) {
            // Session is not authenticated so return error
            Message reply = new Message();
            reply.setID(packet.getID());
            reply.setTo(packet.getFrom());
            reply.setFrom(packet.getTo());
            reply.setError(PacketError.Condition.not_authorized);
            session.process(reply);
            return;
        }
        super.processMessage(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