Example #1
0
 def _handle_new_client(self, conn):
   log.debug('Accepted client at %s' % conn.transport.getPeer().host)
   self.srclients.append(conn)
   # send auth message to drive the sr-client state machine
   salt = os.urandom(20)
   conn.send(VNSAuthRequest(salt))
   return
Example #2
0
 def handle_new_client(self, conn):
     """Sends an authentication request to the new user."""
     logging.debug("client %s connected: sending auth request" % conn)
     conn.vns_auth_salt = os.urandom(20)
     conn.vns_authorized = False
     conn.vns_user_profile = None
     conn.send(VNSAuthRequest(conn.vns_auth_salt))