def decode(self, query):
        if not query:
            return None

        message = Message.fromPostArgs(query)

        mode = message.getArg(OPENID_NS, 'mode')
        if not mode:
            fmt = "No mode value in message %s"
            raise ProtocolError(message, text=fmt % (message,))

        handler = self._handlers.get(mode, self.defaultDecoder)
        return handler(message, self.server.op_endpoint)
I transform query parameters into an L{OpenIDRequest}.
dataset/ETHPy150Open CollabQ/CollabQ/openid/server/server.py/Decoder.decode