Skip to content

Commit

Permalink
allow unencoded authorization request
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Tate <[email protected]>
  • Loading branch information
Ryanmtate committed Nov 19, 2024
1 parent dcc962b commit f1ecd8b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/authorization_request/verification/did.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ pub async fn verify_with_resolver(
bail!("request was signed with unsupported algorithm: {alg}")
}

// This bypass is for unencoded JWT requests, but we will need to change this later
// so that trust is preserved when receiving unencoded requests
// NOTE: This requires that `Algorithm::None` is permitted in the wallet metadata
// Otherwise, this function will error in the previous assertion.
if alg.contains("none") {
return Ok(());
}

let Json::String(kid) = headers
.remove("kid")
.context("'kid' was missing from jwt headers")?
Expand Down

0 comments on commit f1ecd8b

Please sign in to comment.