From 001a9ac21c29af53d31e9710d12e37d565880207 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 10 Apr 2021 16:56:00 +0300 Subject: giving up with style --- src/auth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/auth.rs') diff --git a/src/auth.rs b/src/auth.rs index 65d639b..51b2e6a 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -90,7 +90,7 @@ async fn authorize( let decoded = decode::( &jwt, // TODO: what key are we using here? pass db/pw store here to get the claimant's public key <10-04-21, yigit> // - &DecodingKey::from_rsa_pem(PUBLIC_KEY_PEM.as_bytes()).unwrap(), + &DecodingKey::from_rsa_pem(db.users.read().get(&source).unwrap().pubkey.as_bytes()).unwrap(), &Validation::new(Algorithm::HS512), ) .map_err(|_| reject::custom(Error::JWTTokenError)) -- cgit v1.2.3-70-g09d2