Class DefaultTokenValidator
java.lang.Object
io.micronaut.chatbots.telegram.core.DefaultTokenValidator
- All Implemented Interfaces:
 TokenValidator
- Since:
 - 1.0.0
 - Author:
 - Sergio del Amo
 
- 
Field Summary
Fields inherited from interface io.micronaut.chatbots.telegram.core.TokenValidator
X_TELEGRAM_BOT_API_SECRET_TOKEN - 
Constructor Summary
Constructors - 
Method Summary
 
- 
Constructor Details
- 
DefaultTokenValidator
 
 - 
 - 
Method Details
- 
validate
@NonNull public @NonNull Optional<TelegramBotConfiguration> validate(@NonNull @NotBlank @NonNull @NotBlank String token) - Specified by:
 validatein interfaceTokenValidator- Parameters:
 token- Telegram Token as returned by the Bot Father.- Returns:
 - Returns the 
TelegramBotConfigurationassociated to the token. If the token is not associated with any Telegram bot an empty optional is returned. 
 
 -