Skip to content

Commit

Permalink
🤖 cargo-fmt auto-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 16, 2024
1 parent a89e215 commit 698e32a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internet_identity/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ async fn decode_and_validate_jwt(
// Sort Google keys and their properties since they're returned occasionally in a random order
fn sort_google_certs(body: Vec<u8>) -> Result<Vec<u8>, String> {
// Parse the input JSON
let data: serde_json::Value = serde_json::from_slice(&body).map_err(|_| "Invalid JSON".to_string())?;
let data: serde_json::Value =
serde_json::from_slice(&body).map_err(|_| "Invalid JSON".to_string())?;

// Extract and validate the "keys" array
let keys = data
Expand Down Expand Up @@ -430,7 +431,6 @@ fn sort_google_certs(body: Vec<u8>) -> Result<Vec<u8>, String> {
serde_json::to_vec(&result).map_err(|_| "Unable to encode JSON".to_string())
}


#[query]
fn transform_google_certs(raw: http_request::TransformArgs) -> http_request::HttpResponse {
// The expiry header is stripped in this prototype but in prod
Expand Down

0 comments on commit 698e32a

Please sign in to comment.