use serde::{Deserialize, Serialize}; #[derive(Clone, Serialize, Deserialize)] pub enum AuthenticationMessage { Request(AuthenticationRequest), Response(AuthenticationResponse), } #[derive(Clone, Serialize, Deserialize)] pub enum AuthenticationRequest { AuthenticationToken(AuthenticationTokenRequest), } #[derive(Clone, Serialize, Deserialize)] pub enum AuthenticationResponse { AuthenticationToken(AuthenticationTokenResponse), } #[derive(Clone, Serialize, Deserialize)] pub struct AuthenticationTokenRequest { pub secret_key: String, pub username: String, pub password: String, } #[derive(Clone, Serialize, Deserialize)] pub struct AuthenticationTokenResponse { pub token: String, }