From 54d6afbe21a94c8de53852d4cd550de75473557f Mon Sep 17 00:00:00 2001 From: Vika Date: Fri, 15 Jul 2022 02:14:09 +0300 Subject: WIP: IndieAuth progress - Some kittybox-indieauth crate bugs were fixed - Things should mostly work... - ...if you somehow supply your own backend store - YES I MADE IT MODULAR AGAIN - NO I AM NOT SORRY - YOU WILL THANK ME LATER - DO NOT DENY THE HEAVENLY GIFT OF GENERICS IN RUST - Retrieving profiles doesn't work for now because I am unsure how to implement it best --- kittybox-rs/indieauth/src/pkce.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'kittybox-rs/indieauth/src/pkce.rs') 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 } } -- cgit 1.4.1