kalamdb_commons/websocket_auth.rs
1use serde::{Deserialize, Serialize};
2
3/// Authentication credentials for WebSocket connection.
4///
5/// This enum is the client-facing authentication model for WebSocket
6/// connections. It maps 1:1 with `AuthRequest` variants in `kalamdb-auth`.
7#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
8#[serde(tag = "method", rename_all = "snake_case")]
9pub enum WsAuthCredentials {
10 /// JWT token authentication.
11 Jwt { token: String },
12}