コード例 #1
0
ファイル: gnome-keyring.py プロジェクト: zero77/liferea
 def do_query(self, id):
     coll = self.get_collection()
     if coll:
         items = coll.search_sync(None, {'id': id}, Secret.SearchFlags.UNLOCK, None)
         if items and items[0].load_secret_sync(None):
             username, password = items[0].get_secret().get_text().split('@@@')
             Liferea.auth_info_from_store(id, username, password)
コード例 #2
0
ファイル: gnome-keyring.py プロジェクト: tiwoc/liferea
    def do_query(self, id):
        # Fetch secret by id
        attrs = GnomeKeyring.Attribute.list_new()
        GnomeKeyring.Attribute.list_append_string(attrs, 'id', id)
        result, value = GnomeKeyring.find_items_sync(GnomeKeyring.ItemType.GENERIC_SECRET, attrs)
        if result != GnomeKeyring.Result.OK:
          return

	#print 'password %s = %s' % (id, value[0].secret)
	#print 'password id = %s' % value[0].item_id

	username, password = value[0].secret.split('@@@')
  	Liferea.auth_info_from_store(id, username, password)
コード例 #3
0
    def do_query(self, id):
        # Fetch secret by id
        attrs = GnomeKeyring.Attribute.list_new()
        GnomeKeyring.Attribute.list_append_string(attrs, 'id', id)
        result, value = GnomeKeyring.find_items_sync(GnomeKeyring.ItemType.GENERIC_SECRET, attrs)
        if result != GnomeKeyring.Result.OK:
            return

        #print 'password %s = %s' % (id, value[0].secret)
        #print 'password id = %s' % value[0].item_id

        username, password = value[0].secret.split('@@@')
        Liferea.auth_info_from_store(id, username, password)