'Add a new identity to te JID/node combination.
The data parameter may provide:
category -- The general category to which the agent belongs.
itype    -- A more specific designation with the category.
name     -- Optional human readable name for this identity.
lang     -- Optional standard xml:lang value.'

def add_identity(self, jid, node, ifrom, data):

    with self.lock:
        self.add_node(jid, node)
        self.get_node(jid, node)['info'].add_identity(data.get('category', ''), data.get('itype', ''), data.get('name', None), data.get('lang', None))
