From 25183f2ed7802375f15cb0069af7bee6dd2c7afd Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 10 Jul 2022 14:49:55 +0300 Subject: indieauth: rename to tokenauth This frees up the name for the future in-house IndieAuth implementation and also clarifies the purpose of this module. Its future is uncertain - most probably when the token endpoint gets finished, it will transform into a way to query that token endpoint. But then, the media endpoint also depends on it, so I might have to copy that implementation (that queries an external token endpoint) and make it generic enough so I could both query an external endpoint or use internal data. --- kittybox-rs/src/micropub/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'kittybox-rs/src/micropub/mod.rs') diff --git a/kittybox-rs/src/micropub/mod.rs b/kittybox-rs/src/micropub/mod.rs index 8550849..1fa442a 100644 --- a/kittybox-rs/src/micropub/mod.rs +++ b/kittybox-rs/src/micropub/mod.rs @@ -1,5 +1,5 @@ use crate::database::{MicropubChannel, Storage, StorageError}; -use crate::indieauth::User; +use crate::tokenauth::User; use crate::micropub::util::form_to_mf2_json; use axum::extract::{BodyStream, Query}; use axum::headers::ContentType; @@ -293,7 +293,7 @@ async fn background_processing( // TODO actually save the post to the database and schedule post-processing pub(crate) async fn _post( - user: crate::indieauth::User, + user: User, uid: String, mf2: serde_json::Value, db: D, @@ -681,7 +681,7 @@ impl MicropubQuery { #[cfg(test)] mod tests { - use crate::{database::Storage, micropub::MicropubError}; + use crate::{database::Storage, micropub::MicropubError, tokenauth::User}; use hyper::body::HttpBody; use serde_json::json; @@ -734,7 +734,7 @@ mod tests { "content": ["Hello world!"] } }); - let user = crate::indieauth::User::new( + let user = User::new( "https://localhost:8080/", "https://kittybox.fireburn.ru/", "profile", @@ -763,7 +763,7 @@ mod tests { "url": ["https://fireburn.ru/posts/hello"] } }); - let user = crate::indieauth::User::new( + let user = User::new( "https://aaronparecki.com/", "https://kittybox.fireburn.ru/", "create update media", @@ -790,7 +790,7 @@ mod tests { "content": ["Hello world!"] } }); - let user = crate::indieauth::User::new( + let user = User::new( "https://localhost:8080/", "https://kittybox.fireburn.ru/", "create", @@ -817,7 +817,7 @@ mod tests { axum::extract::Query(super::MicropubQuery::source( "https://aaronparecki.com/feeds/main", )), - crate::indieauth::User::new( + User::new( "https://fireburn.ru/", "https://quill.p3k.io/", "create update media", -- cgit 1.4.1