Class TelegramEventHandlerAuthentication
java.lang.Object
io.github.yvasyliev.telegramforwarderbot.aspect.TelegramEventHandlerAuthentication
Aspect for handling authentication of Telegram events.
It authenticates the user based on the message or callback query received.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
authenticate
(org.telegram.telegrambots.meta.api.objects.CallbackQuery query) Authenticates the user based on the callback query received.void
authenticate
(org.telegram.telegrambots.meta.api.objects.message.Message message) Authenticates the user based on the message received.
-
Constructor Details
-
TelegramEventHandlerAuthentication
public TelegramEventHandlerAuthentication()
-
-
Method Details
-
authenticate
public void authenticate(org.telegram.telegrambots.meta.api.objects.message.Message message) Authenticates the user based on the message received. This method is called before handling a message event.- Parameters:
message
- the message containing the user information
-
authenticate
public void authenticate(org.telegram.telegrambots.meta.api.objects.CallbackQuery query) Authenticates the user based on the callback query received. This method is called before handling a callback query event.- Parameters:
query
- the callback query containing the user information
-