| Crates.io | telegram-authorizer |
| lib.rs | telegram-authorizer |
| version | 0.3.0 |
| created_at | 2024-07-09 14:35:55.292057+00 |
| updated_at | 2025-02-18 09:18:46.22101+00 |
| description | Telegram authorizer for Axum |
| homepage | |
| repository | https://github.com/evilbluebeaver/telegram-authorizer |
| max_upload_size | |
| id | 1297156 |
| size | 36,924 |
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.