diff options
author | metamuffin <metamuffin@disroot.org> | 2025-03-19 19:35:16 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-03-19 19:35:16 +0100 |
commit | 69a77b36172503ada9047a756bb5972a4c7005dc (patch) | |
tree | 8a361183533e972d38b06b59f7a77c98f76b3ab3 /src/modules/auth/openid.rs | |
parent | e22020da294381b22998ee885876b56614bca890 (diff) | |
download | gnix-69a77b36172503ada9047a756bb5972a4c7005dc.tar gnix-69a77b36172503ada9047a756bb5972a4c7005dc.tar.bz2 gnix-69a77b36172503ada9047a756bb5972a4c7005dc.tar.zst |
clippy
Diffstat (limited to 'src/modules/auth/openid.rs')
-rw-r--r-- | src/modules/auth/openid.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/auth/openid.rs b/src/modules/auth/openid.rs index db03c2f..e22bc24 100644 --- a/src/modules/auth/openid.rs +++ b/src/modules/auth/openid.rs @@ -143,7 +143,7 @@ id_token={id_token:?}"# let mut v = context .state .crypto_key - .encrypt(Nonce::from_slice(&nonce), Payload { msg: &r, aad: &[] }) + .encrypt(Nonce::from_slice(&nonce), Payload { msg: r, aad: &[] }) .unwrap(); v.extend(nonce); @@ -190,7 +190,7 @@ fn redirect_uri(request: &NodeRequest) -> Result<Uri, ServiceError> { .to_str()?, ) .ok(); - Ok(Uri::from_parts(redirect_uri).map_err(|_| ServiceError::InvalidUri)?) + Uri::from_parts(redirect_uri).map_err(|_| ServiceError::InvalidUri) } async fn token_request( @@ -234,8 +234,8 @@ async fn token_request( let mut buf = String::new(); body.reader().read_to_string(&mut buf).unwrap(); eprintln!("{buf}"); - Ok(serde_json::from_str(&buf) - .map_err(|_| ServiceError::CustomStatic("invalid token response"))?) + serde_json::from_str(&buf) + .map_err(|_| ServiceError::CustomStatic("invalid token response")) } #[derive(Debug, Deserialize)] |