about summary refs log tree commit diff
path: root/kittybox-rs/indieauth/src
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-07-22 09:37:51 +0300
committerVika <vika@fireburn.ru>2022-07-22 09:37:51 +0300
commitd6978e00552ecf7c661a2df71b14368f0efe6b75 (patch)
treee7b3c4099ae6b47835706d3d90d41b92037454bb /kittybox-rs/indieauth/src
parentd381b12b3ae22b0eca6b24b9435cc28c094eaa60 (diff)
downloadkittybox-d6978e00552ecf7c661a2df71b14368f0efe6b75.tar.zst
kittybox-indieauth: fix AuthorizationRequest doctest
Diffstat (limited to 'kittybox-rs/indieauth/src')
-rw-r--r--kittybox-rs/indieauth/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/kittybox-rs/indieauth/src/lib.rs b/kittybox-rs/indieauth/src/lib.rs
index 826da4e..1f84270 100644
--- a/kittybox-rs/indieauth/src/lib.rs
+++ b/kittybox-rs/indieauth/src/lib.rs
@@ -240,7 +240,7 @@ impl axum_core::response::IntoResponse for Profile {
 pub struct State(String);
 impl State {
     /// Generate a random state string of 128 bytes in length.
-    fn new() -> Self {
+    pub fn new() -> Self {
         use rand::{Rng, distributions::Alphanumeric};
         let bytes = rand::thread_rng()
             .sample_iter(&Alphanumeric)
@@ -256,6 +256,7 @@ impl State {
 /// ```rust
 /// use kittybox_indieauth::{
 ///     AuthorizationRequest, ResponseType, State,
+///     Scopes, Scope,
 ///     PKCEChallenge, PKCEVerifier, PKCEMethod
 /// };
 ///
@@ -276,7 +277,7 @@ impl State {
 ///     .parse()
 ///     .unwrap();
 ///
-/// authorization_endpoint.set_query(serde_urlencoded::to_string(request).unwrap());
+/// url.set_query(Some(&serde_urlencoded::to_string(request).unwrap()));
 ///
 /// // Open a user's browser to navigate to the authorization endpoint page...
 /// ```