Skip to content

Commit

Permalink
Apply 'clippy' fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpfleming committed May 29, 2024
1 parent e6975dc commit 3ebbda7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/jwt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ pub fn validate_token_rs256<CustomClaims: Serialize + DeserializeOwned>(
.find(|&k| k.key_id == key_id)
.unwrap();
// Reconstruct the public key used to sign the token.
let modulus = CUSTOM_ENGINE.decode(&key_metadata.modulus)?;
let exponent = CUSTOM_ENGINE.decode(&key_metadata.exponent)?;
let modulus = CUSTOM_ENGINE.decode(key_metadata.modulus)?;
let exponent = CUSTOM_ENGINE.decode(key_metadata.exponent)?;
let public_key = RS256PublicKey::from_components(&modulus, &exponent)?;
// Verify the token's claims.
// Custom claims are also supported – see https://docs.rs/jwt-simple/0.9.3/jwt_simple/index.html#custom-claims
Expand Down
2 changes: 1 addition & 1 deletion src/pkce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Pkce {
pub fn new(code_challenge_method: &str) -> Self {
let verifier = rand_chars(Self::LENGTH);
let challenge = match code_challenge_method {
"S256" => CUSTOM_ENGINE.encode(&Hash::hash(verifier.as_bytes())),
"S256" => CUSTOM_ENGINE.encode(Hash::hash(verifier.as_bytes())),
_ => CUSTOM_ENGINE.encode(&verifier),
};
Self {
Expand Down

0 comments on commit 3ebbda7

Please sign in to comment.