|
|
@ -214,8 +214,7 @@ impl User {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if cookies.get(TOKEN_EXPIRE_COOKIE)
|
|
|
|
if cookies.get(TOKEN_EXPIRE_COOKIE)
|
|
|
|
.map(|expire| expire.value().parse::<i64>())
|
|
|
|
.map(|expire| expire.value().parse::<i64>())
|
|
|
|
.map(Result::ok)
|
|
|
|
.and_then(Result::ok)
|
|
|
|
.flatten()
|
|
|
|
|
|
|
|
.map_or(true, |timestamp| Utc::now().timestamp() >= timestamp) {
|
|
|
|
.map_or(true, |timestamp| Utc::now().timestamp() >= timestamp) {
|
|
|
|
cookies.remove_private(Cookie::named(TOKEN_COOKIE));
|
|
|
|
cookies.remove_private(Cookie::named(TOKEN_COOKIE));
|
|
|
|
cookies.remove(Cookie::named(TOKEN_EXPIRE_COOKIE));
|
|
|
|
cookies.remove(Cookie::named(TOKEN_EXPIRE_COOKIE));
|
|
|
|