Class ClientAuthorizationStateImpl
java.lang.Object
dev.voroby.springframework.telegram.client.updates.ClientAuthorizationStateImpl
- All Implemented Interfaces:
ClientAuthorizationState
Implementation of
ClientAuthorizationState.- Author:
- Pavel Vorobyev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSends an authentication code to the TDLib for check.voidcheckAuthenticationPassword(String password) Sends a password to the TDLib for check.voidcheckEmailAddress(String email) Sends an email to the TDLib for check.booleanbooleanAll databases are closed and all resources are released.booleanbooleanboolean
-
Constructor Details
-
ClientAuthorizationStateImpl
public ClientAuthorizationStateImpl()
-
-
Method Details
-
checkAuthenticationCode
Description copied from interface:ClientAuthorizationStateSends an authentication code to the TDLib for check.- Specified by:
checkAuthenticationCodein interfaceClientAuthorizationState- Parameters:
code- authentication code received from another logged in client/SMS/email
-
checkAuthenticationPassword
Description copied from interface:ClientAuthorizationStateSends a password to the TDLib for check.- Specified by:
checkAuthenticationPasswordin interfaceClientAuthorizationState- Parameters:
password- two-step verification password
-
checkEmailAddress
Description copied from interface:ClientAuthorizationStateSends an email to the TDLib for check.- Specified by:
checkEmailAddressin interfaceClientAuthorizationState- Parameters:
email- address
-
isWaitAuthenticationCode
public boolean isWaitAuthenticationCode()- Specified by:
isWaitAuthenticationCodein interfaceClientAuthorizationState- Returns:
- authentication sate awaiting authentication code
-
isWaitAuthenticationPassword
public boolean isWaitAuthenticationPassword()- Specified by:
isWaitAuthenticationPasswordin interfaceClientAuthorizationState- Returns:
- authentication sate awaiting two-step verification password
-
isWaitEmailAddress
public boolean isWaitEmailAddress()- Specified by:
isWaitEmailAddressin interfaceClientAuthorizationState- Returns:
- authentication sate awaiting email address
-
haveAuthorization
public boolean haveAuthorization()- Specified by:
haveAuthorizationin interfaceClientAuthorizationState- Returns:
- authorization status
-
isStateClosed
public boolean isStateClosed()Description copied from interface:ClientAuthorizationStateAll 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.- Specified by:
isStateClosedin interfaceClientAuthorizationState- Returns:
- is TDLib client in its final state
-