summaryrefslogtreecommitdiff
path: root/docs/api/plugins/xep_0065.rst
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-02-14 11:53:00 +0100
committermathieui <mathieui@mathieui.net>2021-02-26 00:08:56 +0100
commit0b3233a6e80ab350319334e90743246553b5e181 (patch)
tree62361852b803ad3dc06392f4fcc4d9e10a5e7584 /docs/api/plugins/xep_0065.rst
parentf7ecce42ac953dc358fd2385720fea21fb8406d7 (diff)
downloadslixmpp-0b3233a6e80ab350319334e90743246553b5e181.tar.gz
slixmpp-0b3233a6e80ab350319334e90743246553b5e181.tar.bz2
slixmpp-0b3233a6e80ab350319334e90743246553b5e181.tar.xz
slixmpp-0b3233a6e80ab350319334e90743246553b5e181.zip
XEP-0065: API changes
Diffstat (limited to 'docs/api/plugins/xep_0065.rst')
-rw-r--r--docs/api/plugins/xep_0065.rst40
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/api/plugins/xep_0065.rst b/docs/api/plugins/xep_0065.rst
index d6aec058..a7f1ad67 100644
--- a/docs/api/plugins/xep_0065.rst
+++ b/docs/api/plugins/xep_0065.rst
@@ -8,6 +8,46 @@ XEP-0065: SOCKS5 Bytestreams
:members:
:exclude-members: session_bind, plugin_init, plugin_end
+Internal API methods
+--------------------
+
+The internal API is used here to authorize or pre-authorize streams.
+
+.. glossary::
+
+ authorized_sid (0065 version)
+ - **jid**: :class:`~.JID` receiving the stream initiation.
+ - **node**: stream id
+ - **ifrom**: who the stream is from.
+ - **args**: :class:`~.Iq` of the stream request.
+ - **returns**: ``True`` if the stream should be accepted,
+ ``False`` otherwise.
+
+ Check if the stream should be accepted. Uses
+ the information setup by :term:`preauthorize_sid (0065 version)`
+ by default.
+
+ authorized (0065 version)
+ - **jid**: :class:`~.JID` receiving the stream initiation.
+ - **node**: stream id
+ - **ifrom**: who the stream is from.
+ - **args**: :class:`~.Iq` of the stream request.
+ - **returns**: ``True`` if the stream should be accepted,
+ ``False`` otherwise.
+
+ A fallback handler (run after :term:`authorized_sid (0065 version)`)
+ to check if a stream should be accepted. Uses the ``auto_accept``
+ parameter by default.
+
+ preauthorize_sid (0065 version)
+ - **jid**: :class:`~.JID` receiving the stream initiation.
+ - **node**: stream id
+ - **ifrom**: who the stream will be from.
+ - **args**: Unused.
+
+ Register a stream id to be accepted automatically (called from
+ other plugins such as XEP-0095).
+
Stanza elements
---------------