XEP-0027: Current Jabber OpenPGP Usage¶
- class slixmpp.plugins.xep_0027.XEP_0027(xmpp, config=None)[source]¶
XEP-0027: Current Jabber OpenPGP Usage
- del_keyid(jid=None)[source]¶
Delete a keyid.
Changed in version 1.8.0: This function now returns a Future.
- Return type
Future
- get_keyid(jid=None)[source]¶
Get a keyid for a jid.
Changed in version 1.8.0: This function now returns a Future.
- Return type
Future
Internal API methods¶
The default API here is managing a JID→Keyid dict in-memory.
- get_keyid¶
jid:
JIDto get.node: unused
ifrom: unused
args: unused
returns:
Optional[str], the keyid or None
Get the KeyiD for a JID, None if it is not found.
- set_keyid¶
jid:
JIDto set the id for.node: unused
ifrom: unused
args:
str, keyid to set
Set the KeyiD for a JID.
- del_keyid¶
jid:
JIDto delete from the mapping.node: unused
ifrom: unused
args: unused
Delete the KeyiD for a JID.
- get_keyids¶
jid: unused
node: unused
ifrom: unused
args: unused
returns:
Dict[JID, str]the full internal mapping
Get all currently stored KeyIDs.
Stanza elements¶
- class slixmpp.plugins.xep_0027.stanza.Encrypted(xml=None, parent=None)[source]¶
-
- interfaces: ClassVar[Set[str]] = {'encrypted'}¶
The set of keys that the stanza provides for accessing and manipulating the underlying XML object. This set may be augmented with the
plugin_attribvalue of any registered stanza plugins.
- is_extension: ClassVar[bool] = True¶
If you need to add a new interface to an existing stanza, you can create a plugin and set
is_extension = True. Be sure to set theplugin_attribvalue to the desired interface name, and that it is the only interface listed ininterfaces. Requests for the new interface from the parent stanza will be passed to the plugin directly.New in version 1.0-Beta5.
- name: ClassVar[str] = 'x'¶
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBaseobject for<message />would usename = 'message'.
- namespace: str = 'jabber:x:encrypted'¶
The XML namespace for the element. Given
<foo xmlns="bar" />, thennamespace = "bar"should be used. The default namespace isjabber:clientsince this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'encrypted'¶
For
ElementBasesubclasses which are intended to be used as plugins, theplugin_attribvalue defines the plugin name. Plugins may be accessed by using theplugin_attribvalue as the interface. An example usingplugin_attrib = 'foo':register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']
- class slixmpp.plugins.xep_0027.stanza.Signed(xml=None, parent=None)[source]¶
-
- interfaces: ClassVar[Set[str]] = {'signed'}¶
The set of keys that the stanza provides for accessing and manipulating the underlying XML object. This set may be augmented with the
plugin_attribvalue of any registered stanza plugins.
- is_extension: ClassVar[bool] = True¶
If you need to add a new interface to an existing stanza, you can create a plugin and set
is_extension = True. Be sure to set theplugin_attribvalue to the desired interface name, and that it is the only interface listed ininterfaces. Requests for the new interface from the parent stanza will be passed to the plugin directly.New in version 1.0-Beta5.
- name: ClassVar[str] = 'x'¶
The XML tag name of the element, not including any namespace prefixes. For example, an
ElementBaseobject for<message />would usename = 'message'.
- namespace: str = 'jabber:x:signed'¶
The XML namespace for the element. Given
<foo xmlns="bar" />, thennamespace = "bar"should be used. The default namespace isjabber:clientsince this is being used in an XMPP library.
- plugin_attrib: ClassVar[str] = 'signed'¶
For
ElementBasesubclasses which are intended to be used as plugins, theplugin_attribvalue defines the plugin name. Plugins may be accessed by using theplugin_attribvalue as the interface. An example usingplugin_attrib = 'foo':register_stanza_plugin(Message, FooPlugin) msg = Message() msg['foo']['an_interface_from_the_foo_plugin']