about summary refs log tree commit diff
path: root/kittybox-rs/indieauth/src
diff options
context:
space:
mode:
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...
 /// ```