Module auth_handler

Source
Expand description

Authorization state handlers.

Structs§

AuthStateHandlerProxy
AuthStateHandlerProxy implements AuthStateHandlerProxy in a way that allows to proxy all auth methods to particular clients.
ConsoleAuthStateHandlerDeprecated
Provides minimal implementation of AuthStateHandler. All required methods wait (synchronously) for stdin input
SignalAuthStateHandlerDeprecated
All required methods wait for data sent by Sender.

Enums§

ClientIdentifier
ClientIdentifier allows to determine if client is bot (with bot token as identifier) or client (with a phone number)

Traits§

AuthStateHandler
AuthStateHandler trait provides methods that returns data, required for authentication It allows you to handle particular “auth states”, such as WaitPassword, WaitPhoneNumber and so on.
ClientAuthStateHandler
ClientAuthStateHandler trait provides methods that returns data, required for authentication. Mandatory to use AuthStateHandlerProxy if you want to handle authorization per-client, see See examples/auth_bot.rs for details.