mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 05:26:59 +00:00
Update rauth, pin git repositories in Cargo.toml.
This commit is contained in:
430
Cargo.lock
generated
430
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -12,13 +12,13 @@ many-to-many = "0.1.2"
|
||||
impl_ops = "0.1.1"
|
||||
ctrlc = { version = "3.0", features = ["termination"] }
|
||||
async-tungstenite = { version = "0.10.0", features = ["async-std-runtime"] }
|
||||
rauth = { git = "https://gitlab.insrt.uk/insert/rauth" }
|
||||
rauth = { git = "https://gitlab.insrt.uk/insert/rauth", rev = "8f3ea627" }
|
||||
async-std = { version = "1.8.0", features = ["tokio02", "attributes"] }
|
||||
|
||||
hive_pubsub = { version = "0.4.3", features = ["mongo"] }
|
||||
rocket_cors = { git = "https://github.com/lawliet89/rocket_cors", branch = "master" }
|
||||
rocket_contrib = { git = "https://github.com/SergioBenitez/Rocket", branch = "master" }
|
||||
rocket = { git = "https://github.com/SergioBenitez/Rocket", branch = "master", default-features = false }
|
||||
rocket_cors = { git = "https://github.com/insertish/rocket_cors", branch = "master" }
|
||||
rocket_contrib = { git = "https://github.com/SergioBenitez/Rocket", rev = "031948c1daaa146128d8a435be116476f2adde00" }
|
||||
rocket = { git = "https://github.com/SergioBenitez/Rocket", rev = "031948c1daaa146128d8a435be116476f2adde00", default-features = false }
|
||||
mongodb = { version = "1.1.1", features = ["tokio-runtime"], default-features = false }
|
||||
|
||||
once_cell = "1.4.1"
|
||||
|
||||
@@ -29,7 +29,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for User {
|
||||
} else {
|
||||
Outcome::Failure((
|
||||
Status::InternalServerError,
|
||||
rauth::util::Error::DatabaseError,
|
||||
rauth::util::Error::DatabaseError { operation: "find_one", with: "user" },
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ pub mod util;
|
||||
|
||||
use futures::join;
|
||||
use log::info;
|
||||
use rauth;
|
||||
use rauth::{self, options::Options};
|
||||
use rocket_cors::AllowedOrigins;
|
||||
|
||||
#[async_std::main]
|
||||
@@ -55,10 +55,12 @@ async fn launch_web() {
|
||||
.to_cors()
|
||||
.expect("Failed to create CORS.");
|
||||
|
||||
let auth = rauth::auth::Auth::new(database::get_collection("accounts"));
|
||||
let auth = rauth::auth::Auth::new(database::get_collection("accounts"), Options::new());
|
||||
|
||||
routes::mount(rauth::routes::mount(rocket::ignite(), "/auth", auth))
|
||||
routes::mount(rocket::ignite())
|
||||
.mount("/", rocket_cors::catch_all_options_routes())
|
||||
.mount("/auth", rauth::routes::routes())
|
||||
.manage(auth)
|
||||
.manage(cors.clone())
|
||||
.attach(cors)
|
||||
.launch()
|
||||
|
||||
@@ -12,7 +12,7 @@ use futures::{pin_mut, prelude::*};
|
||||
use hive_pubsub::PubSub;
|
||||
use log::{debug, info};
|
||||
use many_to_many::ManyToMany;
|
||||
use rauth::auth::{Auth, Session};
|
||||
use rauth::{auth::{Auth, Session}, options::Options};
|
||||
use std::collections::HashMap;
|
||||
use std::net::SocketAddr;
|
||||
use std::sync::{Arc, Mutex, RwLock};
|
||||
@@ -84,7 +84,7 @@ async fn accept(stream: TcpStream) {
|
||||
}
|
||||
}
|
||||
|
||||
if let Ok(validated_session) = Auth::new(get_collection("accounts"))
|
||||
if let Ok(validated_session) = Auth::new(get_collection("accounts"), Options::new())
|
||||
.verify_session(new_session)
|
||||
.await
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user