summaryrefslogtreecommitdiff
path: root/src/oauth/pkce.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/oauth/pkce.rs')
-rw-r--r--src/oauth/pkce.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/oauth/pkce.rs b/src/oauth/pkce.rs
index 406d364..0dfc1f8 100644
--- a/src/oauth/pkce.rs
+++ b/src/oauth/pkce.rs
@@ -1,5 +1,5 @@
-use anyhow::{anyhow, Result};
-use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
+use anyhow::{Result, anyhow};
+use base64::{Engine, engine::general_purpose::URL_SAFE_NO_PAD};
use sha2::{Digest, Sha256};
#[derive(Debug, Clone, PartialEq)]
@@ -124,12 +124,14 @@ mod tests {
assert!(verify_code_challenge("short", "challenge", &CodeChallengeMethod::Plain).is_err());
// Invalid characters
- assert!(verify_code_challenge(
- "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjX!",
- "challenge",
- &CodeChallengeMethod::Plain
- )
- .is_err());
+ assert!(
+ verify_code_challenge(
+ "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjX!",
+ "challenge",
+ &CodeChallengeMethod::Plain
+ )
+ .is_err()
+ );
}
#[test]