Crates.io | telegram-authorizer |
lib.rs | telegram-authorizer |
version | 0.1.1 |
source | src |
created_at | 2024-07-09 14:35:55.292057 |
updated_at | 2024-08-06 15:20:12.970429 |
description | Telegram authorizer for Axum |
homepage | |
repository | https://github.com/evilbluebeaver/telegram-authorizer |
max_upload_size | |
id | 1297156 |
size | 7,817 |
Telegram miniapp authorizer layer for Axum.
...
Router::new()
.route("/", get(login))
.layer(telegram_authorizer::AuthorizationLayer(bot_token));`
...
use telegram_authorizer::TelegramUser;
pub async fn login(TelegramUser(id): TelegramUser) -> impl IntoResponse {
tracing::info!("user: {:?}", id);
...
}
One should send initData as query string.