diff options
author | Yigit Sever | 2021-04-10 16:56:00 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-10 16:56:00 +0300 |
commit | 001a9ac21c29af53d31e9710d12e37d565880207 (patch) | |
tree | 7e0bbbc0b828694950ffaff6f6b51f63a62f46c7 /src/auth.rs | |
parent | a3bc90d6755acbe3670dfcf23f35acdaf9b00ffc (diff) | |
download | gradecoin-001a9ac21c29af53d31e9710d12e37d565880207.tar.gz gradecoin-001a9ac21c29af53d31e9710d12e37d565880207.tar.bz2 gradecoin-001a9ac21c29af53d31e9710d12e37d565880207.zip |
giving up with style
Diffstat (limited to 'src/auth.rs')
-rw-r--r-- | src/auth.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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( | |||
90 | let decoded = decode::<Claims>( | 90 | let decoded = decode::<Claims>( |
91 | &jwt, | 91 | &jwt, |
92 | // TODO: what key are we using here? pass db/pw store here to get the claimant's public key <10-04-21, yigit> // | 92 | // TODO: what key are we using here? pass db/pw store here to get the claimant's public key <10-04-21, yigit> // |
93 | &DecodingKey::from_rsa_pem(PUBLIC_KEY_PEM.as_bytes()).unwrap(), | 93 | &DecodingKey::from_rsa_pem(db.users.read().get(&source).unwrap().pubkey.as_bytes()).unwrap(), |
94 | &Validation::new(Algorithm::HS512), | 94 | &Validation::new(Algorithm::HS512), |
95 | ) | 95 | ) |
96 | .map_err(|_| reject::custom(Error::JWTTokenError)) | 96 | .map_err(|_| reject::custom(Error::JWTTokenError)) |