def onConnect(self, req):
        params = req.params

        try:
            userID = params['userID']
            robotID = params['robotID']
            password = params['password']
        except KeyError as e:
            raise HttpException(httpstatus.HTTP_STATUS_CODE_BAD_REQUEST[0],
                                'Request is missing parameter: {0}'.format(e))

        for name, param in [('userID', userID), ('robotID', robotID),
                            ('password', password)]:
            if len(param) != 1:
                raise HttpException(httpstatus.HTTP_STATUS_CODE_BAD_REQUEST[0],
                                    "Parameter '{0}' has to be unique in "
                                    'request.'.format(name))

        d = self._realm.login(userID[0], robotID[0], password[0])
        d.addCallback(self._authenticate_success)
        d.addErrback(self._authenticate_failed)
        return d
Method is called by the Autobahn engine when a request to establish
dataset/ETHPy150Open rapyuta/rce/rce-comm/rce/comm/server.py/RobotWebSocketProtocol.onConnect