diff options
Diffstat (limited to 'kittybox-rs/indieauth/src/pkce.rs')
-rw-r--r-- | kittybox-rs/indieauth/src/pkce.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kittybox-rs/indieauth/src/pkce.rs b/kittybox-rs/indieauth/src/pkce.rs index 1d3c58f..6dabcc3 100644 --- a/kittybox-rs/indieauth/src/pkce.rs +++ b/kittybox-rs/indieauth/src/pkce.rs @@ -40,7 +40,7 @@ pub struct PKCEChallenge { } impl PKCEChallenge { - fn new(code_verifier: PKCEVerifier, method: PKCEMethod) -> Self { + pub fn new(code_verifier: PKCEVerifier, method: PKCEMethod) -> Self { Self { code_challenge: match method { PKCEMethod::S256 => { @@ -53,7 +53,9 @@ impl PKCEChallenge { method } } - fn verify(&self, code_verifier: PKCEVerifier) -> bool { + + #[must_use] + pub fn verify(&self, code_verifier: PKCEVerifier) -> bool { Self::new(code_verifier, self.method) == *self } } |