diff --git a/services/identity/src/config.rs b/services/identity/src/config.rs --- a/services/identity/src/config.rs +++ b/services/identity/src/config.rs @@ -1,7 +1,7 @@ use base64::{engine::general_purpose, DecodeError, Engine as _}; use clap::{Parser, Subcommand}; use once_cell::sync::Lazy; -use std::{collections::HashSet, env, fmt, fs, io, path}; +use std::{env, fmt, fs, io, path}; use tracing::{error, info}; use crate::constants::{ diff --git a/services/identity/src/database/device_list.rs b/services/identity/src/database/device_list.rs --- a/services/identity/src/database/device_list.rs +++ b/services/identity/src/database/device_list.rs @@ -1155,6 +1155,7 @@ mobile_devices.first().cloned() } + #[cfg(test)] mod tests { use super::*; use chrono::Duration; diff --git a/services/identity/src/token.rs b/services/identity/src/token.rs --- a/services/identity/src/token.rs +++ b/services/identity/src/token.rs @@ -32,22 +32,6 @@ } impl AccessTokenData { - pub fn new( - user_id: String, - signing_public_key: String, - auth_type: AuthType, - rng: &mut (impl Rng + CryptoRng), - ) -> Self { - AccessTokenData { - user_id, - signing_public_key, - access_token: Alphanumeric.sample_string(rng, ACCESS_TOKEN_LENGTH), - created: Utc::now(), - auth_type, - valid: true, - } - } - pub fn with_created_time( user_id: String, signing_public_key: String, diff --git a/services/identity/src/websockets/errors.rs b/services/identity/src/websockets/errors.rs --- a/services/identity/src/websockets/errors.rs +++ b/services/identity/src/websockets/errors.rs @@ -1,5 +1,3 @@ -use tracing::error; - pub type BoxedError = Box; #[derive( @@ -7,9 +5,7 @@ )] pub enum WebsocketError { InvalidMessage, - InvalidSearchQuery, UnauthorizedDevice, - SendError, SearchError, AuthError, SerializationError, diff --git a/services/identity/src/websockets/mod.rs b/services/identity/src/websockets/mod.rs --- a/services/identity/src/websockets/mod.rs +++ b/services/identity/src/websockets/mod.rs @@ -187,11 +187,7 @@ } }?; - send_message( - Message::Text(format!("{}", search_result.to_string())), - outgoing.clone(), - ) - .await; + send_message(Message::Text(search_result), outgoing.clone()).await; Ok(()) } diff --git a/shared/tunnelbroker_messages/src/lib.rs b/shared/tunnelbroker_messages/src/lib.rs --- a/shared/tunnelbroker_messages/src/lib.rs +++ b/shared/tunnelbroker_messages/src/lib.rs @@ -1,4 +1,3 @@ pub mod messages; -pub use message_to_device_request_status::*; pub use messages::*;