From cd8029a930b966225d0a57afb1ee29808fe2a409 Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 18 Aug 2024 00:28:00 +0300 Subject: kittybox-indieauth: support transforming strings to PKCEVerifier for apps that can't hold state for long --- indieauth/src/pkce.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indieauth') diff --git a/indieauth/src/pkce.rs b/indieauth/src/pkce.rs index 852ce0a..8dcf9b1 100644 --- a/indieauth/src/pkce.rs +++ b/indieauth/src/pkce.rs @@ -28,6 +28,11 @@ impl PKCEMethod { #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub struct PKCEVerifier(pub(super) String); +impl> From for PKCEVerifier { + fn from(t: T) -> Self { + Self(t.into()) + } +} impl AsRef for PKCEVerifier { fn as_ref(&self) -> &str { self.0.as_str() -- cgit 1.4.1