slidge.core.command.register
#
The register commands, either by chat or adhoc command
Note that single step forms via jabber:iq:register are handled in xep_0077
Module Contents#
Classes#
The type of registration for a gateway |
|
Abstract base class to implement gateway commands (chatbot and ad-hoc) |
- class slidge.core.command.register.RegistrationType[source]#
-
The type of registration for a gateway
Initialize self. See help(type(self)) for accurate signature.
- exception slidge.core.command.register.TwoFactorNotRequired[source]#
Bases:
Exception
Should be raised by two-factor code validation function in case the code is not required after all.
Initialize self. See help(type(self)) for accurate signature.
- class slidge.core.command.register.Register(xmpp)[source]#
Bases:
slidge.core.command.base.Command
Abstract base class to implement gateway commands (chatbot and ad-hoc)
- Parameters:
xmpp (slidge.core.gateway.BaseGateway) –
- _finalize(user)[source]#
- Parameters:
user (slidge.util.db.GatewayUser) –
- async run(_session, _ifrom, *_)[source]#
Entry point of the command
- Parameters:
session – If triggered by a registered user, its slidge Session
ifrom – JID of the command-triggering entity
args – When triggered via chatbot type message, additional words after the CHAT_COMMAND string was passed
- Returns:
Either a TableResult, a Form, a Confirmation, a text, or None
- async two_fa(form_values, _session, _ifrom, user)[source]#
- Parameters:
user (slidge.util.db.GatewayUser) –
- async qr(_form_values, _session, _ifrom, user)[source]#
- Parameters:
user (slidge.util.db.GatewayUser) –