1
0
Fork 0
mirror of https://github.com/kotovalexarian/rocket_csrf.git synced 2024-11-27 11:14:39 -05:00

Update for 2nd release candidate

This commit is contained in:
Fenhl 2022-05-17 07:00:52 +00:00
parent 610f27297c
commit 5002bdbab5
No known key found for this signature in database
GPG key ID: 858B6EC79FD5E692
4 changed files with 4 additions and 5 deletions

View file

@ -16,5 +16,4 @@ publish = true
base64 = { version = "0.13.0" }
bcrypt = { version = "0.9" }
rand = { version = "0.8.3" }
rocket = { version = "0.5.0-rc.1", features = ["secrets"] }
time = { version = "0.2.25" }
rocket = { version = "0.5.0-rc.2", features = ["secrets"] }

View file

@ -5,10 +5,10 @@ use rocket::{
fairing::{self, Fairing as RocketFairing, Info, Kind},
http::{Cookie, Status},
request::{FromRequest, Outcome},
time::{Duration, OffsetDateTime},
Data, Request, Rocket, State,
};
use std::borrow::Cow;
use time::{Duration, OffsetDateTime};
const BCRYPT_COST: u32 = 8;

View file

@ -14,7 +14,7 @@ fn rocket() -> rocket::Rocket<rocket::Build> {
rocket_csrf::CsrfConfig::default()
.with_cookie_name(COOKIE_NAME)
.with_cookie_len(COOKIE_LEN)
.with_lifetime(time::Duration::days(3)),
.with_lifetime(rocket::time::Duration::days(3)),
))
.mount("/", routes![index])
}

View file

@ -19,7 +19,7 @@ fn rocket() -> rocket::Rocket<rocket::Build> {
rocket_csrf::CsrfConfig::default()
.with_cookie_name(COOKIE_NAME)
.with_cookie_len(COOKIE_LEN)
.with_lifetime(time::Duration::days(3)),
.with_lifetime(rocket::time::Duration::days(3)),
))
.mount("/", routes![index])
}