Add cargo.lock and fix some dependencies

Note that the auth_service handler has become less generic, but it's
enough for our purposes.
This commit is contained in:
Valentin Tolmer 2021-06-22 17:27:43 +02:00
parent 0d8e317490
commit d5f84cd588
6 changed files with 6524 additions and 25 deletions

4
.gitignore vendored
View File

@ -5,10 +5,6 @@
/app/pkg /app/pkg
/model/target /model/target
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt # These are backup files generated by rustfmt
**/*.rs.bk **/*.rs.bk

3030
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,21 +4,13 @@ edition = "2018"
name = "lldap" name = "lldap"
version = "0.1.0" version = "0.1.0"
[patch.crates-io]
actix-files = { git = "https://github.com/actix/actix-web", rev = "a9dc1586a0935c48c3f841761bf81c43ca9e2651" }
actix-http = { git = "https://github.com/actix/actix-web", rev = "a9dc1586a0935c48c3f841761bf81c43ca9e2651" }
actix-web = { git = "https://github.com/actix/actix-web", rev = "a9dc1586a0935c48c3f841761bf81c43ca9e2651" }
actix-web-httpauth = { git = "https://github.com/nhruo123/actix-extras", rev = "b4e8db446843a99b06c7ec40f18ef7b59ee7e955" }
[dependencies] [dependencies]
actix = "0.11.1" actix = "0.11.0-beta.3"
actix-files = "0.6.0-beta.4"
actix-http = "3.0.0-beta.6" actix-http = "3.0.0-beta.6"
actix-rt = "2.2" actix-rt = "2.1.0"
actix-server = "2.0.0-beta.5" actix-server = "2.0.0-beta.3"
actix-service = "2.0.0" actix-service = "2.0.0"
actix-web = "4.0.0-beta.6" actix-web = "4.0.0-beta.3"
actix-web-httpauth = "0.6.0-beta.1"
anyhow = "*" anyhow = "*"
rust-argon2 = "0.8" rust-argon2 = "0.8"
async-trait = "0.1" async-trait = "0.1"
@ -42,7 +34,7 @@ time = "0.2"
tokio = { version = "1.2.0", features = ["full"] } tokio = { version = "1.2.0", features = ["full"] }
tokio-util = "0.6.3" tokio-util = "0.6.3"
tracing = "*" tracing = "*"
tracing-actix-web = "0.3.0-beta.2" tracing-actix-web = "0.4.0-beta.7"
tracing-log = "*" tracing-log = "*"
tracing-subscriber = "*" tracing-subscriber = "*"
rand = { version = "0.8", features = ["small_rng", "getrandom"] } rand = { version = "0.8", features = ["small_rng", "getrandom"] }
@ -67,5 +59,17 @@ features = ["with-chrono"]
features = ["env", "toml"] features = ["env", "toml"]
version = "*" version = "*"
[dependencies.actix-files]
git = "https://github.com/actix/actix-web"
rev = "2d8530feb37447a1dd2e58700b31b987ae8163ef"
#[dependencies.actix-cors]
#git = "https://github.com/nitnelave/actix-extras"
#rev = "39b03cb5d2734482328722219c528cb0a6d375d7"
[dependencies.actix-web-httpauth]
git = "https://github.com/nitnelave/actix-extras"
rev = "39b03cb5d2734482328722219c528cb0a6d375d7"
[dev-dependencies] [dev-dependencies]
mockall = "0.9.1" mockall = "0.9.1"

1883
app/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

1588
model/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -209,13 +209,12 @@ where
pub struct CookieToHeaderTranslatorFactory; pub struct CookieToHeaderTranslatorFactory;
impl<S, B> Transform<S, ServiceRequest> for CookieToHeaderTranslatorFactory impl<S> Transform<S, ServiceRequest> for CookieToHeaderTranslatorFactory
where where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = actix_web::Error>, S: Service<ServiceRequest, Response = ServiceResponse, Error = actix_web::Error>,
S::Future: 'static, S::Future: 'static,
B: 'static,
{ {
type Response = ServiceResponse<B>; type Response = ServiceResponse;
type Error = actix_web::Error; type Error = actix_web::Error;
type InitError = (); type InitError = ();
type Transform = CookieToHeaderTranslator<S>; type Transform = CookieToHeaderTranslator<S>;
@ -230,13 +229,12 @@ pub struct CookieToHeaderTranslator<S> {
service: S, service: S,
} }
impl<S, B> Service<ServiceRequest> for CookieToHeaderTranslator<S> impl<S> Service<ServiceRequest> for CookieToHeaderTranslator<S>
where where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = actix_web::Error>, S: Service<ServiceRequest, Response = ServiceResponse, Error = actix_web::Error>,
S::Future: 'static, S::Future: 'static,
B: 'static,
{ {
type Response = ServiceResponse<B>; type Response = ServiceResponse;
type Error = actix_web::Error; type Error = actix_web::Error;
#[allow(clippy::type_complexity)] #[allow(clippy::type_complexity)]
type Future = Pin<Box<dyn core::future::Future<Output = Result<Self::Response, Self::Error>>>>; type Future = Pin<Box<dyn core::future::Future<Output = Result<Self::Response, Self::Error>>>>;