private void processRoute(final Route packet) {
        if (!session.isAuthenticated()) {
            // Session is not authenticated so return error
            Route reply = new Route(packet.getStreamID());
            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.route(packet);
    }
Process stanza sent by a client that is connected to a connection manager. The
original stanza is wrapped in the route element. Only a single stanza must be
wrapped in the route element.

@param packet the route element.
xmppserver/src/main/java/org/jivesoftware/openfire/net/MultiplexerStanzaHandler.java