当前位置: 首页>>代码示例>>Python>>正文


Python Secret.password_clear_sync方法代码示例

本文整理汇总了Python中gi.repository.Secret.password_clear_sync方法的典型用法代码示例。如果您正苦于以下问题:Python Secret.password_clear_sync方法的具体用法?Python Secret.password_clear_sync怎么用?Python Secret.password_clear_sync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gi.repository.Secret的用法示例。


在下文中一共展示了Secret.password_clear_sync方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: set_account_password

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_clear_sync [as 别名]
def set_account_password(email, password):
    attrs = {"email": email}
    if password:
        Secret.password_store_sync(_ACCOUNT_SCHEMA, attrs, Secret.COLLECTION_DEFAULT,
                                    "Pandora Account", password, None)
    else:
        Secret.password_clear_sync(_ACCOUNT_SCHEMA, attrs, None)
开发者ID:NightBuilder,项目名称:pithos,代码行数:9,代码来源:util.py

示例2: erase

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_clear_sync [as 别名]
def erase():
    attributes = get_attributes()

    if 'password' in attributes:
        del attributes['password']

    Secret.password_clear_sync(
            GIT_CREDENTIALS_SCHEMA,
            attributes,
            None
            )
开发者ID:timhughes,项目名称:git-credential-libsecret,代码行数:13,代码来源:git-credential-libsecret.py

示例3: testSyncNotFound

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_clear_sync [as 别名]
	def testSyncNotFound(self):
		attributes = { "number": "11", "string": "one", "even": "true" }

		password = Secret.password_lookup_sync(STORE_SCHEMA, attributes, None)
		self.assertEqual(None, password)

		deleted = Secret.password_clear_sync(STORE_SCHEMA, attributes, None)
		self.assertEqual(False, deleted)
开发者ID:Arkhont,项目名称:libsecret,代码行数:10,代码来源:test-clear-password.py

示例4: testSynchronous

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_clear_sync [as 别名]
	def testSynchronous(self):
		attributes = { "number": "1", "string": "one", "even": "false" }

		password = Secret.password_lookup_sync(STORE_SCHEMA, attributes, None)
		self.assertEqual("111", password)

		deleted = Secret.password_clear_sync(STORE_SCHEMA, attributes, None)
		self.assertEqual(True, deleted)
开发者ID:Arkhont,项目名称:libsecret,代码行数:10,代码来源:test-clear-password.py

示例5: clear

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_clear_sync [as 别名]
    def clear():
        """
           Clear all existing accounts.

           :return bool: Either the token was removed successfully or not
       """
        schema = Keyring.get_default().schema
        success = Secret.password_clear_sync(schema, {}, None)
        return success
开发者ID:bil-elmoussaoui,项目名称:Gnome-TwoFactorAuth,代码行数:11,代码来源:keyring.py

示例6: remove

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_clear_sync [as 别名]
    def remove(secret_id):
        """
        Remove a specific secret OTP token.

        :param secret_id: the secret ID associated to the OTP token
        :return bool: Either the token was removed successfully or not
        """
        schema = Keyring.get_default().schema
        success = Secret.password_clear_sync(
            schema, {"id": str(secret_id)}, None)
        return success
开发者ID:bil-elmoussaoui,项目名称:Gnome-TwoFactorAuth,代码行数:13,代码来源:keyring.py

示例7: clear_password

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_clear_sync [as 别名]
 def clear_password(self, scheme, host, username):
     """Remove the password from the cache."""
     template = dict(zip(self.category, (scheme, host, username)))
     Secret.password_clear_sync(self.schema, template, None)
开发者ID:benfitzpatrick,项目名称:rose,代码行数:6,代码来源:ws_client_auth.py

示例8: do_delete

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_clear_sync [as 别名]
 def do_delete(self, id):
     Secret.password_clear_sync(SCHEMA, {'id': id}, None)
开发者ID:lwindolf,项目名称:liferea,代码行数:4,代码来源:gnome-keyring.py

示例9: _clear_account_password

# 需要导入模块: from gi.repository import Secret [as 别名]
# 或者: from gi.repository.Secret import password_clear_sync [as 别名]
def _clear_account_password(email):
    return Secret.password_clear_sync(_ACCOUNT_SCHEMA, {"email": email}, None)
开发者ID:evilwordsoup,项目名称:pithos,代码行数:4,代码来源:util.py


注:本文中的gi.repository.Secret.password_clear_sync方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。