Extract the authentication database from the File Service #103

Merged
savanni merged 3 commits from authdb into main 2023-11-20 05:02:53 +00:00
4 changed files with 7 additions and 11 deletions
Showing only changes of commit 8b53114d0d - Show all commits

View File

@ -14,13 +14,10 @@ path = "src/lib.rs"
name = "file-service" name = "file-service"
path = "src/main.rs" path = "src/main.rs"
[[bin]]
name = "auth-cli"
path = "src/bin/cli.rs"
[target.auth-cli.dependencies] [target.auth-cli.dependencies]
[dependencies] [dependencies]
authdb = { path = "../authdb/" }
base64ct = { version = "1", features = [ "alloc" ] } base64ct = { version = "1", features = [ "alloc" ] }
build_html = { version = "2" } build_html = { version = "2" }
bytes = { version = "1" } bytes = { version = "1" }
@ -38,6 +35,7 @@ mime_guess = "2.0.3"
pretty_env_logger = { version = "0.5" } pretty_env_logger = { version = "0.5" }
serde_json = "*" serde_json = "*"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
sha2 = { version = "0.10" }
thiserror = { version = "1" } thiserror = { version = "1" }
tokio = { version = "1", features = [ "full" ] } tokio = { version = "1", features = [ "full" ] }
uuid = { version = "0.4", features = [ "serde", "v4" ] } uuid = { version = "0.4", features = [ "serde", "v4" ] }

View File

@ -1,6 +1,5 @@
mod store; mod store;
pub use store::{ pub use store::{
AuthDB, AuthError, AuthToken, DeleteFileError, FileHandle, FileId, FileInfo, ReadFileError, DeleteFileError, FileHandle, FileId, FileInfo, ReadFileError, Store, WriteFileError,
SessionToken, Store, Username, WriteFileError,
}; };

View File

@ -18,9 +18,10 @@ mod pages;
const MAX_UPLOAD: u64 = 15 * 1024 * 1024; const MAX_UPLOAD: u64 = 15 * 1024 * 1024;
pub use file_service::{ use authdb::{AuthDB, AuthError, AuthToken, SessionToken, Username};
AuthDB, AuthError, AuthToken, DeleteFileError, FileHandle, FileId, FileInfo, ReadFileError,
SessionToken, Store, Username, WriteFileError, use file_service::{
DeleteFileError, FileHandle, FileId, FileInfo, ReadFileError, Store, WriteFileError,
}; };
pub use handlers::handle_index; pub use handlers::handle_index;

View File

@ -1,8 +1,6 @@
use base64ct::{Base64, Encoding};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::{collections::HashSet, ops::Deref, path::PathBuf}; use std::{collections::HashSet, ops::Deref, path::PathBuf};
use thiserror::Error; use thiserror::Error;
use uuid::Uuid;
mod filehandle; mod filehandle;
mod fileinfo; mod fileinfo;