Exemple #1
0
    def SetDisplayName(self, profile_id, new_display_name):
        #Get info
        info = gk.item_get_info_sync(self.keyring_name, profile_id)
        attributes = self.GetAttributes(profile_id)

        #Change info
        info.set_display_name(new_display_name)

        #Update info
        gk.item_set_info_sync(self.keyring_name, profile_id, info)
        gk.item_set_attributes_sync(self.keyring_name, profile_id, attributes)
Exemple #2
0
    def SetPassword(self, profile_id, new_password):
        #Get info
        info = gk.item_get_info_sync(self.keyring_name, profile_id)
        attributes = self.GetAttributes(profile_id)

        #Change info
        info.set_secret(new_password.encode('ascii', 'ignore'))

        #Update info
        gk.item_set_info_sync(self.keyring_name, profile_id, info)
        gk.item_set_attributes_sync(self.keyring_name, profile_id, attributes)
def set_credentials(email, password):
    item_id = get_item_id()
    
    info = gk.ItemInfo()
    info.set_display_name(_display_name)
    info.set_type(_type)
    info.set_secret(password)
    gk.item_set_info_sync(_keyring, item_id, info)
    
    attrs = _attrs.copy()
    attrs['email'] = email
    gk.item_set_attributes_sync(_keyring, item_id, attrs)
Exemple #4
0
def set_credentials(email, password):
    item_id = get_item_id()

    info = gk.ItemInfo()
    info.set_display_name(_display_name)
    info.set_type(_type)
    info.set_secret(password)
    gk.item_set_info_sync(_keyring, item_id, info)

    attrs = _attrs.copy()
    attrs['email'] = email
    gk.item_set_attributes_sync(_keyring, item_id, attrs)
Exemple #5
0
 def SetAttributes(self, profile_id, attributes):
     gk.item_set_attributes_sync(self.keyring_name, profile_id, attributes)
Exemple #6
0
	def __set_usr(self, usr, item):
		""" Set the username of the account details """
		attrs = { "username" : str(usr)}
		gk.item_set_attributes_sync(self.NAME, item, attrs)