aboutsummaryrefslogtreecommitdiff
path: root/src/modules/auth/openid.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/auth/openid.rs')
-rw-r--r--src/modules/auth/openid.rs8
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)]