Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data AuthorizationState
- = AuthorizationStateWaitTdlibParameters
- | AuthorizationStateWaitPhoneNumber
- | AuthorizationStateWaitEmailAddress { }
- | AuthorizationStateWaitEmailCode { }
- | AuthorizationStateWaitCode { }
- | AuthorizationStateWaitOtherDeviceConfirmation { }
- | AuthorizationStateWaitRegistration { }
- | AuthorizationStateWaitPassword { }
- | AuthorizationStateReady
- | AuthorizationStateLoggingOut
- | AuthorizationStateClosing
- | AuthorizationStateClosed
Documentation
data AuthorizationState Source #
Represents the current authorization state of the TDLib client
AuthorizationStateWaitTdlibParameters | Initialization parameters are needed. Call setTdlibParameters to provide them |
AuthorizationStateWaitPhoneNumber | TDLib needs the user's phone number to authorize. Call setAuthenticationPhoneNumber to provide the phone number, or use requestQrCodeAuthentication or checkAuthenticationBotToken for other authentication options |
AuthorizationStateWaitEmailAddress | TDLib needs the user's email address to authorize. Call setAuthenticationEmailAddress to provide the email address, or directly call checkAuthenticationEmailCode with Apple ID/Google ID token if allowed |
| |
AuthorizationStateWaitEmailCode | TDLib needs the user's authentication code sent to an email address to authorize. Call checkAuthenticationEmailCode to provide the code |
| |
AuthorizationStateWaitCode | TDLib needs the user's authentication code to authorize. Call checkAuthenticationCode to check the code |
| |
AuthorizationStateWaitOtherDeviceConfirmation | The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link |
AuthorizationStateWaitRegistration | The user is unregistered and need to accept terms of service and enter their first name and last name to finish registration. Call registerUser to accept the terms of service and provide the data |
| |
AuthorizationStateWaitPassword | The user has been authorized, but needs to enter a 2-step verification password to start using the application. Call checkAuthenticationPassword to provide the password, or requestAuthenticationPasswordRecovery to recover the password, or deleteAccount to delete the account after a week |
| |
AuthorizationStateReady | The user has been successfully authorized. TDLib is now ready to answer general requests |
AuthorizationStateLoggingOut | The user is currently logging out |
AuthorizationStateClosing | TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received |
AuthorizationStateClosed | TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to with error code 500. To continue working, one must create a new instance of the TDLib client |
Instances
FromJSON AuthorizationState Source # | |
Defined in TD.Data.AuthorizationState parseJSON :: Value -> Parser AuthorizationState # parseJSONList :: Value -> Parser [AuthorizationState] # | |
Show AuthorizationState Source # | |
Defined in TD.Data.AuthorizationState showsPrec :: Int -> AuthorizationState -> ShowS # show :: AuthorizationState -> String # showList :: [AuthorizationState] -> ShowS # | |
Eq AuthorizationState Source # | |
Defined in TD.Data.AuthorizationState (==) :: AuthorizationState -> AuthorizationState -> Bool # (/=) :: AuthorizationState -> AuthorizationState -> Bool # | |
ShortShow AuthorizationState Source # | |
Defined in TD.Data.AuthorizationState shortShow :: AuthorizationState -> String Source # |