Skip to content

Commit

Permalink
Fix detached typo
Browse files Browse the repository at this point in the history
  • Loading branch information
KendallWeihe committed Sep 20, 2024
1 parent e640319 commit 852e43a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/web5/src/jose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct Jws {
pub payload: Vec<u8>,
pub signature: Vec<u8>,
pub compact_jws: String,
pub detatched_compact_jws: String,
pub detached_compact_jws: String,
}

impl Jws {
Expand Down Expand Up @@ -92,7 +92,7 @@ impl Jws {
base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(signature.clone());

let compact_jws = format!("{}.{}.{}", header_part, claims_part, signature_part);
let detatched_compact_jws = format!("{}..{}", header_part, signature_part);
let detached_compact_jws = format!("{}..{}", header_part, signature_part);

Ok(Self {
kid: verification_method_id,
Expand All @@ -101,7 +101,7 @@ impl Jws {
payload: payload.into(),
signature,
compact_jws,
detatched_compact_jws,
detached_compact_jws,
})
}

Expand Down Expand Up @@ -185,7 +185,7 @@ impl Jws {
payload,
signature,
compact_jws: compact_jws.to_string(),
detatched_compact_jws: format!("{}..{}", parts[0], parts[2]),
detached_compact_jws: format!("{}..{}", parts[0], parts[2]),
})
}
}
Expand Down Expand Up @@ -252,7 +252,7 @@ impl Jwt {
claims: claims.clone(),
signature: jws.signature,
compact_jws: jws.compact_jws,
detached_compact_jws: jws.detatched_compact_jws,
detached_compact_jws: jws.detached_compact_jws,
})
}

Expand All @@ -267,7 +267,7 @@ impl Jwt {
claims: claims.clone(),
signature: jws.signature,
compact_jws: jws.compact_jws,
detached_compact_jws: jws.detatched_compact_jws,
detached_compact_jws: jws.detached_compact_jws,
})
}
}

0 comments on commit 852e43a

Please sign in to comment.