about summary refs log tree commit diff
path: root/kittybox-rs/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'kittybox-rs/src/main.rs')
-rw-r--r--kittybox-rs/src/main.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/kittybox-rs/src/main.rs b/kittybox-rs/src/main.rs
index 796903b..ad76042 100644
--- a/kittybox-rs/src/main.rs
+++ b/kittybox-rs/src/main.rs
@@ -123,11 +123,15 @@ async fn main() {
             ));
 
         let micropub = axum::Router::new()
-            .route("/.kittybox/micropub", kittybox::micropub::router(database.clone(), http.clone()))
+            .route("/.kittybox/micropub", kittybox::micropub::router(
+                database.clone(),
+                http.clone(),
+                auth_backend.clone()
+            ))
             .nest("/.kittybox/micropub/client", kittybox::companion::router());
 
         let media = axum::Router::new()
-            .nest("/.kittybox/media", kittybox::media::router(blobstore).layer(axum::Extension(http)));
+            .nest("/.kittybox/media", kittybox::media::router(blobstore, auth_backend.clone()));
 
         let indieauth = kittybox::indieauth::router(auth_backend, database.clone());
 
@@ -165,13 +169,6 @@ async fn main() {
             .merge(media)
             .merge(indieauth)
             .merge(technical)
-            .layer(
-                axum::Extension(
-                    kittybox::tokenauth::TokenEndpoint(
-                        "https://tokens.indieauth.com/token".parse().unwrap()
-                    )
-                )
-            )
             .layer(tower::ServiceBuilder::new()
                    .layer(tower_http::trace::TraceLayer::new_for_http())
                    .into_inner())