diff options
Diffstat (limited to 'crates/auth/src')
-rw-r--r-- | crates/auth/src/main.rs | 6 | ||||
-rw-r--r-- | crates/auth/src/server/routes/authorised.rs | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/crates/auth/src/main.rs b/crates/auth/src/main.rs index 72f991f..53a18dd 100644 --- a/crates/auth/src/main.rs +++ b/crates/auth/src/main.rs @@ -16,11 +16,7 @@ use tonic::service::Routes; use tower::{make::Shared, steer::Steer}; use tracing::{info, trace}; -use crate::{ - error::AppError, - server::{grpc::interceptor::MyInterceptor, routes::authorised::AuthRequest}, - state::AppState, -}; +use crate::{error::AppError, server::grpc::interceptor::MyInterceptor, state::AppState}; /// auth-service #[derive(Parser, Debug)] diff --git a/crates/auth/src/server/routes/authorised.rs b/crates/auth/src/server/routes/authorised.rs index 50fcfc8..83f73cf 100644 --- a/crates/auth/src/server/routes/authorised.rs +++ b/crates/auth/src/server/routes/authorised.rs @@ -91,6 +91,8 @@ pub async fn login_authorised( .await .context("failed to deserialise response as JSON")?; + dbg!(&user_data); + let user_data: User = serde_json::from_value(user_data)?; if !user_data.verified { @@ -122,10 +124,8 @@ pub async fn login_authorised( .await?; let user = if let Some(user) = user { - println!("some"); user } else { - println!("none"); let uuid = uuid::Uuid::now_v7(); let user = sqlx::query_as!( DbUser, @@ -170,7 +170,6 @@ pub async fn login_authorised( let claims = Claims { sub: user.id, - // Mandatory expiry time as UTC timestamp exp: exp.unix_timestamp(), iss: "sellershut".to_owned(), sid: session_id.to_string(), |