From 66049566ae865e1a4bd049257d6afc0abded16e9 Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 19 Sep 2022 17:30:38 +0300 Subject: feat: indieauth support Working: - Tokens and codes - Authenticating with a password Not working: - Setting the password (need to patch onboarding) - WebAuthn (the JavaScript is too complicated) --- kittybox-rs/Cargo.toml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'kittybox-rs/Cargo.toml') diff --git a/kittybox-rs/Cargo.toml b/kittybox-rs/Cargo.toml index b82b2a9..c9b98a2 100644 --- a/kittybox-rs/Cargo.toml +++ b/kittybox-rs/Cargo.toml @@ -7,9 +7,12 @@ default-run = "kittybox" autobins = false [features] -default = [] +default = ["openssl"] #util = ["anyhow"] #migration = ["util"] +openssl = ["reqwest/native-tls-vendored", "reqwest/native-tls-alpn"] +rustls = ["reqwest/rustls-tls-webpki-roots"] +cli = ["clap"] [[bin]] name = "kittybox" @@ -26,12 +29,18 @@ required-features = [] #path = "src/bin/kittybox_database_converter.rs" #required-features = ["migration", "redis"] +[[bin]] +name = "kittybox-indieauth-helper" +path = "src/bin/kittybox-indieauth-helper.rs" +required-features = ["cli"] + [workspace] members = [".", "./util", "./templates", "./indieauth"] default-members = [".", "./util", "./templates", "./indieauth"] [dependencies.kittybox-util] version = "0.1.0" path = "./util" +features = ["fs"] [dependencies.kittybox-templates] version = "0.1.0" path = "./templates" @@ -51,6 +60,7 @@ rand = "^0.8.5" # Utilities for random number generation tracing-test = "^0.2.2" [dependencies] +argon2 = { version = "^0.4.1", features = ["std"] } async-trait = "^0.1.50" # Type erasure for async trait methods bytes = "^1.1.0" data-encoding = "^2.3.2" # Efficient and customizable data-encoding functions like base64, base32, and hex @@ -75,6 +85,7 @@ tracing-tree = "0.2.1" tracing-subscriber = { version = "0.3.11", features = ["env-filter", "json"] } tower-http = { version = "0.3.3", features = ["trace", "cors", "catch-panic"] } tower = { version = "0.4.12", features = ["tracing"] } +webauthn = { version = "0.4.5", package = "webauthn-rs", features = ["danger-allow-state-serialisation"] } [dependencies.tokio] version = "^1.16.1" features = ["full", "tracing"] # TODO determine if my app doesn't need some features @@ -92,6 +103,9 @@ optional = true [dependencies.axum] version = "^0.5.11" features = ["multipart", "json", "headers", "form"] +[dependencies.axum-extra] +version = "^0.3.7" +features = ["cookie"] [dependencies.chrono] # Date and time library for Rust version = "^0.4.19" features = ["serde"] @@ -114,7 +128,14 @@ features = ["stream", "runtime"] [dependencies.reqwest] version = "^0.11.10" default-features = false -features = ["rustls-tls-webpki-roots", "gzip", "brotli", "json", "stream"] +features = ["gzip", "brotli", "json", "stream"] [dependencies.microformats] version = "^0.2.0" #git = "https://gitlab.com/maxburon/microformats-parser" + +[dependencies.clap] +version = "3.2.22" +features = ["derive"] +optional = true +[dependencies.thiserror] +version = "1.0.35" -- cgit 1.4.1