Commits

Cédric Bonhomme  committed 6a524af

Some improvements about the authentication process.

  • Participants
  • Parent commits c6b3bbf

Comments (0)

Files changed (2)

File source/configurations/clients_informations.xml

+<?xml version="1.0" ?><clients><client><name>bob</name><password>5ed25af7b1ed23fb00122e13d7f74c4d8262acd8</password><ontology>ontoBOB1</ontology><pubkey>26132083131104328772915520935906375741258270791954907144762536711849699668443-39405459139698945953820799021932797301078095534722266488704157617712445066389</pubkey></client><client><name>alice</name><password>92ef57ba40706594b46425705e989cbc256d9724</password><ontology>ChatTout</ontology><pubkey>54454921728377717257547813832479245729136087241850165130075873362087690308127-65531769888088421015639757020470536864719945014583667952974249971550025211857</pubkey></client></clients>

File source/simpleGui.py

         msg.title('Connection to the SPADE platform')
         msg.resizable(height = False, width = False)
 
-        Label(msg, text='Username : ').grid(row = 0, column = 0, sticky = W)
+        Label(msg, text='Your username : ').grid(row = 0, column = 0, sticky = W)
         username_entry = Entry(msg)
         username_entry.grid(row = 0, column = 1, pady = 2, sticky = W)
         username_entry.insert(0, self.agent_name.lower())
         """
         client = None
         try:
-            client = self.listbox.get(int(self.listbox.curselection()[0])) \
-                    .split(' ')[0].lower()
+            client = self.listbox.get(int(self.listbox.curselection()[0]))
         except IndexError:
             pass
         if client is not None:
         """
         if client is None:
             try:
-                client = self.listbox.get(int(self.listbox.curselection()[0])) \
-                        .split(' ')[0].lower()
+                client = self.listbox.get(int(self.listbox.curselection()[0]))
             except IndexError:
                 pass
         if client not in self.client_agent.receiver.keys():
         message = str(self.message_to_send.get(0.0, END).encode('utf-8'))
         self.message_to_send.delete(1.0, END)
 
+        if self.client_agent is None:
+            self.show_info('You are not connected to the SPADE platform.')
+            return
+
         if len(message) <= 1:
-            self.show_info('Enter a message')
+            self.show_info('Enter a message.')
             return
 
         if len(self.client_agent.receiver) == 0: