ibr
— In-Band Registration (XEP-0077)¶
This module implements in-band registration.
Registration Functions¶
The module level registration functions work on an
aioxmpp.protocol.XMLStream
and before authentication. They
allow to register a new account with a server.
-
async
aioxmpp.ibr.
get_registration_fields
(xmlstream, timeout=60)[source]¶ A query is sent to the server to obtain the fields that need to be filled to register with the server.
- Parameters
xmlstream (
aioxmpp.protocol.XMLStream
) – Specifies the stream connected to the server where the account will be created.timeout (
Real
orNone
) – Maximum time in seconds to wait for an IQ response, orNone
to disable the timeout.
- Returns
list
-
async
aioxmpp.ibr.
register
(xmlstream, query_xso, timeout=60)[source]¶ Create a new account on the server.
- Parameters
query_xso (
Query
) – XSO with the information needed for the registration.xmlstream (
aioxmpp.protocol.XMLStream
) – Specifies the stream connected to the server where the account will be created.timeout (
Real
orNone
) – Maximum time in seconds to wait for an IQ response, orNone
to disable the timeout.
Helper Function¶
Service¶
-
class
aioxmpp.ibr.
RegistrationService
(client, *, logger_base=None, dependencies={}, service_order_index=0)[source]¶ Service implementing the XMPP In-Band Registration(XEP-0077) use cases for registered entities.
This service allows an already registered and authenticated entity to request information about the registration, cancel an existing registration, or change a password.
-
async
get_client_info
()[source]¶ A query is sent to the server to obtain the client’s data stored at the server.
- Returns
-
async
cancel_registration
()[source]¶ Cancels the currents client’s account with the server.
Even if the cancellation is successful, this method will raise an exception due to he account no longer exists for the server, so the client will fail. To continue with the execution, this method should be surrounded by a try/except statement.
-
async