diff options
author | Vika <vika@fireburn.ru> | 2022-07-22 09:37:51 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-07-22 09:37:51 +0300 |
commit | d6978e00552ecf7c661a2df71b14368f0efe6b75 (patch) | |
tree | e7b3c4099ae6b47835706d3d90d41b92037454bb /kittybox-rs/indieauth/src/lib.rs | |
parent | d381b12b3ae22b0eca6b24b9435cc28c094eaa60 (diff) | |
download | kittybox-d6978e00552ecf7c661a2df71b14368f0efe6b75.tar.zst |
kittybox-indieauth: fix AuthorizationRequest doctest
Diffstat (limited to 'kittybox-rs/indieauth/src/lib.rs')
-rw-r--r-- | kittybox-rs/indieauth/src/lib.rs | 5 |
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... /// ``` |